Skip to content

Commit

Permalink
Merge pull request #403 from Xiangyu-Hu/feature/split-ci-jobs
Browse files Browse the repository at this point in the history
Split Linux CI job into build and test
  • Loading branch information
Xiangyu-Hu authored Aug 23, 2023
2 parents 09ee30a + 90a3015 commit 6bfe059
Showing 1 changed file with 63 additions and 1 deletion.
64 changes: 63 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
run: cmake --build build --config Release --verbose

###############################################################################
Linux-double:
Linux-build:
runs-on: ubuntu-22.04
env:
VCPKG_DEFAULT_TRIPLET: x64-linux
Expand Down Expand Up @@ -147,6 +147,68 @@ jobs:
- name: Build using double
run: cmake --build build --config Release --verbose

- name: Zip build folder
run: zip -r build.zip ./build

- uses: actions/upload-artifact@v3
with:
name: Linux-build
path: ${{github.workspace}}/build.zip
if-no-files-found: error
retention-days: 1

Linux-test:
needs: Linux-build
runs-on: ubuntu-22.04
env:
VCPKG_DEFAULT_TRIPLET: x64-linux

steps:
- uses: actions/checkout@v3

- name: Install system dependencies
run: |
sudo apt update
sudo apt install -y \
apt-utils \
build-essential \
curl zip unzip tar `# when starting fresh on a WSL image for bootstrapping vcpkg`\
pkg-config `# for installing libraries with vcpkg`\
git \
cmake \
ninja-build \
libfontconfig1-dev `# From here required for vcpkg opencascade`\
libx11-dev \
libgl-dev
- uses: friendlyanon/setup-vcpkg@v1 # Setup vcpkg into ${{github.workspace}}
with:
committish: ${{ env.VCPKG_VERSION }}
cache-version: ${{env.VCPKG_VERSION}}

- name: Install dependencies
run: |
${{github.workspace}}/vcpkg/vcpkg install --clean-after-build openblas[dynamic-arch] --allow-unsupported # last argument to remove after regression introduced by microsoft/vcpkg#30192 is addressed
# Simbody depends on (open)blas implementation, which -march=native by default, conflicting with cache restore, hence dynamic-arch feature
# Above problem might also be resolved by adding the hash of architecture in the cache key, esp. if more package do the same
${{github.workspace}}/vcpkg/vcpkg install --clean-after-build \
eigen3 \
tbb \
boost-program-options \
boost-geometry \
simbody \
gtest \
xsimd \
pybind11 \
opencascade
- uses: actions/download-artifact@v3
with:
name: Linux-build

- name: Unzip build folder
run: unzip build.zip

- name: Test with the first try
id: first-try
run: |
Expand Down

0 comments on commit 6bfe059

Please sign in to comment.