Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Nov 17, 2023
1 parent 04fdae1 commit b6361b8
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
run: sudo ./install-build-deps.sh
- name: ccache
uses: hendrikmuhs/ccache-action@v1
- name: build and test
- name: build
run: |
echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
sudo apt-get install -y clang++-12
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++-12 ${{ matrix.target }} ..
cmake -S . -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++-12 ${{ matrix.target }}
cmake --build . -j$(nproc)
ctest . -j$(nproc)
- name: test
run: ctest build -j$(nproc)
- name: archive test results
uses: actions/upload-artifact@v3
if: failure()
Expand All @@ -47,6 +47,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: install-build-deps
shell: bash
run: |
# Install cross toolchains
./install-build-deps.sh
Expand Down Expand Up @@ -85,14 +86,14 @@ jobs:
chmod 755 /usr/local/bin/qemu-loongarch64
- name: ccache
uses: hendrikmuhs/ccache-action@v1
- name: build and test
- name: build
run: |
echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
mkdir build
cd build
cmake ..
cmake -S . -B build
cmake --build . -j$(nproc)
ctest . -j$(nproc)
- name: test
run: ctest build -j$(nproc)
- name: archive test results
uses: actions/upload-artifact@v3
if: failure()
Expand All @@ -114,12 +115,11 @@ jobs:
- uses: actions/checkout@v3
- name: ccache
uses: hendrikmuhs/ccache-action@v1
- name: build and test
- name: build
run: |
echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
mkdir build
cd build
cmake ${{ matrix.target }} ..
cmake -S . -B build ${{ matrix.target }}
cmake --build . -j$(sysctl -n hw.physicalcpu)
build-windows:
Expand All @@ -129,6 +129,5 @@ jobs:
- name: build
run: |
mkdir build
cd build
cmake -T clangcl ..
cmake -S . -B build -T clangcl
cmake --build . -j $Env:NUMBER_OF_PROCESSORS

0 comments on commit b6361b8

Please sign in to comment.