8000 Move build system to zig build by rdunnington · Pull Request #101 · orca-app/orca · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Move build system to zig build #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jul 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
84f542f
turn on asan by default
martinfouilleul Mar 22, 2025
f3a0b15
turn on ubsan and fix a couple UB
martinfouilleul Mar 22, 2025
cf4739c
fix void pointer arithmetic in hash.c, which is not allowed by msvc
martinfouilleul Mar 22, 2025
4b55aab
fix ub f32 to int cast overflow when computing tile counts in wgpu_re…
martinfouilleul Mar 24, 2025
242778c
zig build system
rdunnington Jul 3, 2025
cece92a
addressing review feedback
rdunnington Jul 3, 2025
5b6ac97
update deprecated module parameters, use host target for build script…
Parzival-3141 Jul 4, 2025
34a6947
remove some verbosity when defining `curl_lib` options
Parzival-3141 Jul 4, 2025
714dceb
fix include casing error for cross-compilation on linux
rdunnington Jul 5, 2025
3ad3a2c
- Use new releases of angle and dawn whose name is based on their com…
martinfouilleul Jul 5, 2025
cb4490a
update angle/dawn to use releases with unix-style newlines for windows
rdunnington Jul 6, 2025
1ecbe3f
fix orca-libc include paths
rdunnington Jul 6, 2025
f99f2a0
fix header generation path comment
rdunnington Jul 7, 2025
55af783
macOS: use @ex 8000 ecutable_path for loading dynamic libraries instead of …
martinfouilleul Jul 7, 2025
5e02188
use target info in package_sdk for cross compilation
Parzival-3141 Jul 7, 2025
29d7ee6
remove clean step
rdunnington Jul 7, 2025
3a2fe22
checkin gles_api.json instead of regenerating it
rdunnington Jul 7, 2025
612ab2b
deleted unused scripts
rdunnington Jul 7, 2025
dd18333
removed .orcasource, moved vermin.ini to scripts
martinfouilleul Jul 8, 2025
a7d8b66
updated readme, quickstart, and building docs
martinfouilleul Jul 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 65 additions & 105 deletions .github/workflows/build-all.yaml
F438
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
name: build-all

on:
workflow_dispatch:
inputs:
version:
type: string
required: false
ignore-cache:
required: false
type: string
default: false
workflow_call:
inputs:
version:
type: string
required: false
ignore-cache:
required: false
type: string
default: false

push:
branches:
- main
Expand All @@ -14,170 +28,116 @@ on:
- main

jobs:
build-dawn-mac:
uses: ./.github/workflows/build-dawn-mac.yaml

build-dawn-win:
uses: ./.github/workflows/build-dawn-win.yaml

build-angle-mac:
uses: ./.github/workflows/build-angle-mac.yaml

build-angle-win:
uses: ./.github/workflows/build-angle-win.yaml
determine-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.determine-version.outputs.version }}
steps:
- name: Determine version
id: determine-version
run: |
if [ "${{ inputs.version }}" != '' ] ; then
echo Selecting version: ${{ inputs.version }}
echo "version='${{ inputs.version }}'" >> "$GITHUB_OUTPUT"
else
echo Selecting version: ${{ github.ref_name }}
echo "version='${{ github.ref_name }}'" >> "$GITHUB_OUTPUT"
fi

build-win:
needs: [build-dawn-win, build-angle-win]
needs: [determine-version]
runs-on: windows-2022
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
- uses: mlugg/setup-zig@v1
with:
path: artifact
version: 0.14.0

- uses: KyleMayes/install-llvm-action@v2
with:
version: "18.1"
- uses: actions/checkout@v4

- name: Copy Dawn
shell: cmd
run: |
xcopy artifact\dawn-windows-x64 build\dawn.out\ /s /y
# Disable tests on Windows for now due to dumb problems with how the CI runner
# runs tests differently from local machines
# - name: Build and run tests
# run: |
# zig build test

- name: Copy Angle
shell: cmd
- name: Build sketches
run: |
xcopy artifact\angle-windows-x64 build\angle.out\ /s /y
zig build sketches

- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH="C:\Program Files\LLVM\bin";%PATH%
clang -v
clang -print-targets
orcadev.bat build --release --version ${{github.ref_name}} || exit 1

- name: Package
shell: cmd
- name: Build and Package
run: |
if [${{ inputs.version }}]==[] (
orcadev.bat install orca dev-dependencies || exit 1
tar --format=ustar -cvzf orca-windows.tar.gz orca
tar --format=ustar -cvzf dev-dependencies-windows.tar.gz dev-dependencies
) else (
orcadev.bat install --version ${{ inputs.version }} orca dev-dependencies || exit 1
tar --format=ustar -cvzf orca-windows.tar.gz orca
tar --format=ustar -cvzf dev-dependencies-windows.tar.gz dev-dependencies
)
zig build -Doptimize=ReleaseFast -Dsdk-path=orca -Dversion=${{ needs.determine-version.outputs.version }} --summary all
tar --format=ustar -cvzf orca-windows-x64.tar.gz orca

- uses: actions/upload-artifact@v4
with:
name: orca-windows
path: orca-windows.tar.gz

- uses: actions/upload-artifact@v4
with:
name: dev-dependencies-windows
path: dev-dependencies-windows.tar.gz
name: orca-windows-x64
path: orca-windows-x64.tar.gz

build-macos-x64:
needs: [build-dawn-mac, build-angle-mac]
needs: [determine-version]
runs-on: macos-13
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
- uses: mlugg/setup-zig@v1
with:
path: artifact
version: 0.14.0

- name: Copy Dawn
run: |
mkdir -p build
cp -r artifact/dawn-mac-x64 build/dawn.out
- uses: actions/checkout@v4

- name: Copy Angle
- name: Build and run tests
run: |
mkdir -p build
cp -r artifact/angle-mac-x64 build/angle.out
zig build test

- name: Build
- name: Build sketches
run: |
./orcadev build --release --version ${{github.ref_name}}
zig build sketches

- name: Package
- name: Build and Package
run: |
if [ "${{ inputs.version }}" != '' ] ; then
./orcadev install --version ${{ inputs.version }} orca dev-dependencies
else
./orcadev install orca dev-dependencies
fi
zig build -Doptimize=ReleaseFast -Dsdk-path=orca -Dversion=${{ needs.determine-version.outputs.version }} --summary all
tar --format=ustar -czf orca-mac-x64.tar.gz orca
tar --format=ustar -czf dev-dependencies-mac-x64.tar.gz dev-dependencies

- uses: actions/upload-artifact@v4
with:
name: orca-mac-x64
path: orca-mac-x64.tar.gz

- uses: actions/upload-artifact@v4
with:
name: dev-dependencies-mac-x64
path: dev-dependencies-mac-x64.tar.gz

build-macos-arm64:
needs: [build-dawn-mac, build-angle-mac]
needs: [determine-version]
runs-on: macos-14
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
- uses: mlugg/setup-zig@v1
with:
path: artifact
version: 0.14.0

- name: Copy Dawn
run: |
mkdir -p build
cp -r artifact/dawn-mac-arm64 build/dawn.out
- uses: actions/checkout@v4

- name: Copy Angle
- name: Build and run tests
run: |
mkdir -p build
cp -r artifact/angle-mac-arm64 build/angle.out
zig build test

- name: Build
- name: Build sketches
run: |
./orcadev build --release --version ${{github.ref_name}}
zig build sketches

- name: Package
- name: Build and Package
run: |
if [ "${{ inputs.version }}" != '' ] ; then
./orcadev install --version ${{ inputs.version }} orca dev-dependencies
else
./orcadev install orca dev-dependencies
fi
zig build -Doptimize=ReleaseFast -Dsdk-path=orca -Dversion=${{ needs.determine-version.outputs.version }} --summary all
tar --format=ustar -czf orca-mac-arm64.tar.gz orca
tar --format=ustar -czf dev-dependencies-mac-arm64.tar.gz dev-dependencies

- uses: actions/upload-artifact@v4
with:
name: orca-mac-arm64
path: orca-mac-arm64.tar.gz

- uses: actions/upload-artifact@v4
with:
name: dev-dependencies-mac-arm64
path: dev-dependencies-mac-arm64.tar.gz
42 changes: 0 additions & 42 deletions .github/workflows/build-angle-mac.yaml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/build-angle-win.yaml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/build-dawn-mac.yaml

This file was deleted.

Loading
0