From 1b0d290bf5f705fb9c93fd938488ce60dfea7760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabien=20P=C3=A9an?= <99172565+FabienPean-Virtonomy@users.noreply.github.com> Date: Tue, 8 Aug 2023 08:15:35 +0000 Subject: [PATCH 1/3] Split Linux CI job into build and test --- .github/workflows/ci.yml | 58 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 401d60937e..0634776e0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -147,6 +147,62 @@ jobs: - name: Build using double run: cmake --build build --config Release --verbose + - uses: actions/upload-artifact@v3 + with: + name: Linux-build + path: ${{github.workspace}}/build + 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: Test with the first try id: first-try run: | From 5f540aad2cbbe7fa3e213746964d580265208f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabien=20P=C3=A9an?= <99172565+FabienPean-Virtonomy@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:04:39 +0000 Subject: [PATCH 2/3] Zip build folder before upload --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0634776e0b..efaa8979b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,10 +147,13 @@ jobs: - name: Build using double run: cmake --build build --config Release --verbose + - name: Zip build folder + run: zip -r build.zip ${{github.workspace}}/build + - uses: actions/upload-artifact@v3 with: name: Linux-build - path: ${{github.workspace}}/build + path: ${{github.workspace}}/build.zip if-no-files-found: error retention-days: 1 @@ -203,6 +206,9 @@ jobs: with: name: Linux-build + - name: Unzip build folder + run: unzip build.zip + - name: Test with the first try id: first-try run: | From 90a3015fdf08a572dfc509e4b61d94fc700fb954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabien=20P=C3=A9an?= <99172565+FabienPean-Virtonomy@users.noreply.github.com> Date: Tue, 8 Aug 2023 16:07:47 +0000 Subject: [PATCH 3/3] Fix bash path --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efaa8979b5..20b9037596 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -148,7 +148,7 @@ jobs: run: cmake --build build --config Release --verbose - name: Zip build folder - run: zip -r build.zip ${{github.workspace}}/build + run: zip -r build.zip ./build - uses: actions/upload-artifact@v3 with: