From 0edb549e5550422c6d994446819ad2db88a9aad9 Mon Sep 17 00:00:00 2001 From: Leonardo Da Pozzo Date: Tue, 23 Apr 2024 17:06:11 +0200 Subject: [PATCH 1/3] install deps --- .github/workflows/create_artifact.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create_artifact.yml b/.github/workflows/create_artifact.yml index 716bb15224..5cf4f5fb6a 100644 --- a/.github/workflows/create_artifact.yml +++ b/.github/workflows/create_artifact.yml @@ -6,17 +6,21 @@ jobs: create_build_artifact: runs-on: ubuntu-22.04 steps: + - name: Install dependencies + run: | + apt-get update + apt-get install gcc g++ gfortran ninja-build git cmake liblapack-dev pkg-config --install-recommends -y + - uses: actions/checkout@v4 with: ref: 3.6.3 - name: Build casadi run: | - install_prefix=$(pwd)/casadi_install/ - mkdir -p ${install_prefix} + mkdir -p casadi_install mkdir build cd build - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${install_prefix} + cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=casadi_install cd .. cmake --build build cmake --install build @@ -25,5 +29,6 @@ jobs: uses: actions/upload-artifact@v4 with: name: casadi_v3.6.3 - path: ${install_prefix} + path: casadi_install overwrite: true + if-no-files-found: error From 78d6bf869793521cf7de1a846bf2b05085be4922 Mon Sep 17 00:00:00 2001 From: Leonardo Da Pozzo <43698284+Nargaruga@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:09:19 +0200 Subject: [PATCH 2/3] use sudo --- .github/workflows/create_artifact.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create_artifact.yml b/.github/workflows/create_artifact.yml index 5cf4f5fb6a..699dceaed0 100644 --- a/.github/workflows/create_artifact.yml +++ b/.github/workflows/create_artifact.yml @@ -8,8 +8,8 @@ jobs: steps: - name: Install dependencies run: | - apt-get update - apt-get install gcc g++ gfortran ninja-build git cmake liblapack-dev pkg-config --install-recommends -y + sudo apt-get update + sudo apt-get install gcc g++ gfortran ninja-build git cmake liblapack-dev pkg-config --install-recommends -y - uses: actions/checkout@v4 with: From 88d42f1706da54e4f178d97c0d9eee49888db9b6 Mon Sep 17 00:00:00 2001 From: Leonardo Da Pozzo Date: Tue, 23 Apr 2024 17:37:31 +0200 Subject: [PATCH 3/3] fix install prefix --- .github/workflows/create_artifact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_artifact.yml b/.github/workflows/create_artifact.yml index 699dceaed0..a5b68ecfad 100644 --- a/.github/workflows/create_artifact.yml +++ b/.github/workflows/create_artifact.yml @@ -20,7 +20,7 @@ jobs: mkdir -p casadi_install mkdir build cd build - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=casadi_install + cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/casadi_install cd .. cmake --build build cmake --install build