Skip to content

Commit

Permalink
building Angle in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfouilleul committed Apr 7, 2024
1 parent 2f9722d commit 9aab0be
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/build-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ jobs:
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

build-win:
needs: [build-dawn-win]
needs: [build-dawn-win, build-angle-win]
runs-on: windows-2022
steps:
- uses: actions/setup-python@v4
Expand All @@ -36,6 +42,11 @@ jobs:
run: |
xcopy artifact\dawn-windows-x64 build\dawn.out\ /s /y
- name: Copy Angle
shell: cmd
run: |
xcopy artifact\angle-windows-x64 build\angle.out\ /s /y
- name: Build
shell: cmd
run: |
Expand All @@ -58,7 +69,7 @@ jobs:
path: orca-windows.tar.gz

build-macos-x64:
needs: [build-dawn-mac]
needs: [build-dawn-mac, build-angle-mac]
runs-on: macos-13
steps:
- uses: actions/setup-python@v4
Expand All @@ -76,6 +87,11 @@ jobs:
mkdir -p build
cp -r artifact/dawn-mac-x64 build/dawn.out
- name: Copy Angle
run: |
mkdir -p build
cp -r artifact/angle-mac-x64 build/angle.out
- name: Build
run: |
./orcadev build --release --version ${{github.ref_name}}
Expand All @@ -95,7 +111,7 @@ jobs:
path: orca-mac-x64.tar.gz

build-macos-arm64:
needs: [build-dawn-mac]
needs: [build-dawn-mac, build-angle-mac]
runs-on: macos-14
steps:
- uses: actions/setup-python@v4
Expand All @@ -113,6 +129,11 @@ jobs:
mkdir -p build
cp -r artifact/dawn-mac-arm64 build/dawn.out
- name: Copy Angle
run: |
mkdir -p build
cp -r artifact/angle-mac-arm64 build/angle.out
- name: Build
run: |
./orcadev build --release --version ${{github.ref_name}}
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/build-angle-mac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build-angle-mac

on:
workflow_dispatch:
workflow_call:

jobs:
build-mac:
strategy:
matrix:
os: [macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Angle version
id: angle-version
run: |
echo "ANGLE_COMMIT=$(cat deps/angle-commit.txt)" >> $GITHUB_OUTPUT
ARCH=${{ runner.arch }}
echo "LOWERCASE_ARCH=$(echo $ARCH | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- name: Cache
id: cache-angle
uses: actions/cache@v3
with:
path: build/angle.out
key: angle-${{ runner.os }}-${{ runner.arch }}-${{ steps.angle-version.outputs.ANGLE_COMMIT }}

- name: Build Angle
if: steps.cache-angle.outputs.cache-hit != 'true'
run: |
./orcadev build-angle --release
- uses: actions/upload-artifact@v4
with:
name: angle-mac-${{steps.angle-version.outputs.LOWERCASE_ARCH}}
path: build/angle.out
41 changes: 41 additions & 0 deletions .github/workflows/build-angle-win.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build-angle-win

on:
workflow_dispatch:
workflow_call:

jobs:
build-win:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Angle version
id: angle-version
shell: cmd
run: |
@chcp 65001>nul
set /p ANGLE_COMMIT=<deps/angle-commit.txt
echo ANGLE_COMMIT=%ANGLE_COMMIT% >> %GITHUB_OUTPUT%
- name: Cache
id: cache-angle
uses: actions/cache@v3
with:
path: build/angle.out
key: angle-${{ runner.os }}-${{ runner.arch }}-${{ steps.angle-version.outputs.ANGLE_COMMIT }}

- name: Build Angle
if: steps.cache-angle.outputs.cache-hit != 'true'
shell: cmd
run: |
orcadev build-angle --release
- uses: actions/upload-artifact@v4
with:
name: angle-windows-x64
path: build/angle.out

0 comments on commit 9aab0be

Please sign in to comment.