Skip to content

Commit

Permalink
Optimize ci
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhuai committed Jan 24, 2024
1 parent f689e09 commit 11029fb
Showing 1 changed file with 32 additions and 26 deletions.
58 changes: 32 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: |
sudo apt-get remove clang-format*
sudo apt-get autoremove
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" | sudo tee -a /etc/apt/sources.list
echo "deb-src https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
Expand All @@ -30,62 +30,68 @@ jobs:
cmake -B build .
cmake --build build -- check-format
linux:
windows:
needs: code-style
runs-on: ubuntu-latest
runs-on: windows-latest
strategy:
matrix:
arch:
- amd64
- x86
- amd64_arm64
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Build
shell: cmd
run: |
cmake -B build .
cmake -GNinja -B build .
cmake --build build -- all
- name: Test
if: ${{ matrix.arch != 'amd64_arm64' }}
shell: cmd
run: |
cmake --build build -- check
macos:
needs: code-style
runs-on: macos-latest
strategy:
matrix:
arch:
- x86_64
- arm64
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
run: |
cmake -B build .
cmake -DCMAKE_OSX_ARCHITECTURES=${{matrix.arch}} -B build .
cmake --build build -- all
- name: Test
if: ${{ matrix.arch != 'arm64' }}
run: |
cmake --build build -- check
windows-x64:
linux:
needs: code-style
runs-on: windows-2019
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake -GNinja -B build .
cmake -B build .
cmake --build build -- all
- name: Test
run: |
cmake --build build -- check
windows-x86:
needs: code-style
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
cmake -GNinja -B build .
cmake --build build -- all
cmake --build build -- check

0 comments on commit 11029fb

Please sign in to comment.