Skip to content

Commit

Permalink
feat(ci): add CMAKE_BUILD_PARALLEL_LEVEL env
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Dec 21, 2024
1 parent d37f6a6 commit 66587ca
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ jobs:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn install
- run: yarn build-native && rm -rf build
- name: build
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
run: yarn build-native && rm -rf build
- run: yarn test
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,38 +32,51 @@ jobs:
- name: externals cache
uses: actions/[email protected]
if: runner.os != 'Windows'
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
with:
path: externals
key: ${{ runner.os }}-externals-${{ hashFiles('scripts/prepare-*.sh') }}
- name: externals cache (Windows)
uses: actions/[email protected]
if: runner.os == 'Windows'
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
with:
path: externals
key: ${{ runner.os }}-externals-${{ hashFiles('scripts/prepare-*.ps1') }}
- name: Install dependencies
run: yarn install
- name: Prepare & build (Windows)
if: runner.os == 'Windows'
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
run: |
powershell ./scripts/prepare-windows.ps1
powershell ./scripts/build-windows.ps1
- name: Prepare & build (Linux x86_64)
if: runner.os == 'Linux'
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
run: |
bash ./scripts/prepare-linux.sh
bash ./scripts/build-linux.sh
- name: Prepare & build (Linux arm64)
if: runner.os == 'Linux'
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
run: |
docker run --rm \
-e CMAKE_BUILD_PARALLEL_LEVEL=${{ env.CMAKE_BUILD_PARALLEL_LEVEL }} \
-v $(pwd):/${{ github.workspace }} \
-w /${{ github.workspace }} \
--platform linux/arm64 \
arm64v8/ubuntu:latest \
bash -c "./scripts/prepare-linux.sh && ./scripts/build-linux.sh"
- name: Build (macOS)
if: runner.os == 'macOS'
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
run: bash ./scripts/build-macos.sh
- name: Upload build artifacts
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 66587ca

Please sign in to comment.