From 2f2aa01d1fc5c47d58e04b11f0d0aba43316f639 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 11:43:42 +0100 Subject: [PATCH 01/30] Create main.yml --- .github/workflows/main.yml | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000000..3861537fb5f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,50 @@ +name: CMake/C++ CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + install_deps: + runs-on: ubuntu-latest + steps: + - name: build-tools + run: apt install build-essential ninja-build clang + - name: project-tools + run: apt install cmake ccache + - name: qt5-deps + run: apt install qt5-default + - name: boost-deps + run: apt install libboost-atomic-dev libboost-chrono-dev \ + libboost-date-time-dev libboost-filesystem-dev \ + libboost-locale-dev libboost-regex-dev libboost-system-dev \ + libboost-thread-dev libboost-program-options-dev + - name: python2-deps + run: apt install python2.7-dev python-numpy python-scipy + - name: extra-deps + run: apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: create_dir + run: mkdir build + - name: cmake + run: cmake -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" \ + -S . -B ./build \ + -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON + - name: make + run: make -j4 + - name: make install + run: make install -j4 + + # run-tests: + # runs-on: ubuntu-latest + # steps: + # - name: run-tests + # run: sh build/bin/run-tests.sh From 16ee78f65f01177b81c33b8c5388dfdeaaf7bc9e Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 11:48:28 +0100 Subject: [PATCH 02/30] Update main.yml using sudo on apt install packages --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3861537fb5f..808982fcc0f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,20 +13,20 @@ jobs: runs-on: ubuntu-latest steps: - name: build-tools - run: apt install build-essential ninja-build clang + run: sudo apt install build-essential ninja-build clang - name: project-tools - run: apt install cmake ccache + run: sudo apt install cmake ccache - name: qt5-deps - run: apt install qt5-default + run: sudo apt install qt5-default - name: boost-deps - run: apt install libboost-atomic-dev libboost-chrono-dev \ + run: sudo apt install libboost-atomic-dev libboost-chrono-dev \ libboost-date-time-dev libboost-filesystem-dev \ libboost-locale-dev libboost-regex-dev libboost-system-dev \ libboost-thread-dev libboost-program-options-dev - name: python2-deps - run: apt install python2.7-dev python-numpy python-scipy + run: sudo apt install python2.7-dev python-numpy python-scipy - name: extra-deps - run: apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev + run: sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev build: runs-on: ubuntu-latest From 91e336e72f77ef109ca7e144c06d43f8ce16b127 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 11:50:54 +0100 Subject: [PATCH 03/30] Update main.yml replacing specific boost packages with libboost-all-dev --- .github/workflows/main.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 808982fcc0f..07d3ddabfb8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,10 +19,7 @@ jobs: - name: qt5-deps run: sudo apt install qt5-default - name: boost-deps - run: sudo apt install libboost-atomic-dev libboost-chrono-dev \ - libboost-date-time-dev libboost-filesystem-dev \ - libboost-locale-dev libboost-regex-dev libboost-system-dev \ - libboost-thread-dev libboost-program-options-dev + run: sudo apt install libboost-atomic-dev libboost-all-dev - name: python2-deps run: sudo apt install python2.7-dev python-numpy python-scipy - name: extra-deps From 30abbd86b35d34373050a13bba6b8abdc71a7d95 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 11:55:13 +0100 Subject: [PATCH 04/30] Update main.yml force apt update... --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07d3ddabfb8..c5365294d63 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,9 @@ jobs: install_deps: runs-on: ubuntu-latest steps: + - name: apt-update + run: + sudo apt-get update - name: build-tools run: sudo apt install build-essential ninja-build clang - name: project-tools From 150aa1551a97e691b54aaf38495fdd30347f749d Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 12:02:50 +0100 Subject: [PATCH 05/30] Update main.yml Jobs are ran in parallel... so Single job configuration for now --- .github/workflows/main.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5365294d63..c382de81395 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,21 +27,17 @@ jobs: run: sudo apt install python2.7-dev python-numpy python-scipy - name: extra-deps run: sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: create_dir - run: mkdir build - - name: cmake - run: cmake -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" \ - -S . -B ./build \ - -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON - - name: make - run: make -j4 - - name: make install - run: make install -j4 + - uses: actions/checkout@v1 + - name: create_dir + run: mkdir build + - name: cmake + run: cmake -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" \ + -S . -B ./build \ + -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON + - name: make + run: make -j4 + - name: make install + run: make install -j4 # run-tests: # runs-on: ubuntu-latest From 45d151826453de97559347f0dcb0eafabc6122d0 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 13:42:38 +0100 Subject: [PATCH 06/30] Update main.yml simplifying build steps --- .github/workflows/main.yml | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c382de81395..64ae2f3f467 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,29 +15,23 @@ jobs: - name: apt-update run: sudo apt-get update - - name: build-tools - run: sudo apt install build-essential ninja-build clang - - name: project-tools - run: sudo apt install cmake ccache - - name: qt5-deps - run: sudo apt install qt5-default - - name: boost-deps - run: sudo apt install libboost-atomic-dev libboost-all-dev - - name: python2-deps - run: sudo apt install python2.7-dev python-numpy python-scipy - - name: extra-deps - run: sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev + sudo apt install build-essential ninja-build clang + sudo apt install cmake ccache + sudo apt install qt5-default + sudo apt install libboost-atomic-dev libboost-all-dev + sudo apt install python2.7-dev python-numpy python-scipy + sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev + - uses: actions/checkout@v1 - - name: create_dir - run: mkdir build - - name: cmake - run: cmake -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" \ - -S . -B ./build \ - -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON + - name: configure + run: + mkdir -p build + echo $PWD + cmake -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -S "./sofa" -B "./build" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON - name: make - run: make -j4 - - name: make install - run: make install -j4 + run: + make -j4 + make install # run-tests: # runs-on: ubuntu-latest From fbd63bb18ccd272f709dcde4774988e10ddd87db Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 13:43:46 +0100 Subject: [PATCH 07/30] Update main.yml missing semi-colon? --- .github/workflows/main.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 64ae2f3f467..1352e139cab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,23 +14,23 @@ jobs: steps: - name: apt-update run: - sudo apt-get update - sudo apt install build-essential ninja-build clang - sudo apt install cmake ccache - sudo apt install qt5-default - sudo apt install libboost-atomic-dev libboost-all-dev - sudo apt install python2.7-dev python-numpy python-scipy - sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev + sudo apt-get update; + sudo apt install build-essential ninja-build clang; + sudo apt install cmake ccache; + sudo apt install qt5-default; + sudo apt install libboost-atomic-dev libboost-all-dev; + sudo apt install python2.7-dev python-numpy python-scipy; + sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev; - uses: actions/checkout@v1 - name: configure run: - mkdir -p build - echo $PWD + mkdir -p build; + echo $PWD; cmake -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -S "./sofa" -B "./build" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON - name: make run: - make -j4 + make -j4; make install # run-tests: From 98a880168015540af656e0a25e0a6b162d81d9b2 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 13:47:18 +0100 Subject: [PATCH 08/30] Update main.yml renaming job... lolz --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1352e139cab..da125ebd0dd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ on: - master jobs: - install_deps: + build: runs-on: ubuntu-latest steps: - name: apt-update @@ -27,7 +27,7 @@ jobs: run: mkdir -p build; echo $PWD; - cmake -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -S "./sofa" -B "./build" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON + cmake -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -S "." -B "./build" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON - name: make run: make -j4; From c7b4549085d78c71fa6fe34f5c3dee8ff312c2ab Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 13:53:49 +0100 Subject: [PATCH 09/30] Update main.yml figuring out the dir tree --- .github/workflows/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da125ebd0dd..fb335b6e23c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,19 +14,19 @@ jobs: steps: - name: apt-update run: - sudo apt-get update; - sudo apt install build-essential ninja-build clang; - sudo apt install cmake ccache; - sudo apt install qt5-default; - sudo apt install libboost-atomic-dev libboost-all-dev; - sudo apt install python2.7-dev python-numpy python-scipy; - sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev; - + #sudo apt-get update; + #sudo apt install build-essential ninja-build clang; + #sudo apt install cmake ccache; + #sudo apt install qt5-default; + #sudo apt install libboost-atomic-dev libboost-all-dev; + #sudo apt install python2.7-dev python-numpy python-scipy; + #sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev; + echo "plop" - uses: actions/checkout@v1 - name: configure run: mkdir -p build; - echo $PWD; + tree $PWD -L 2; cmake -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -S "." -B "./build" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON - name: make run: From 203e321f1cc2b6344238f30603f8c77f13f6fdb4 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 13:54:19 +0100 Subject: [PATCH 10/30] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb335b6e23c..4b5cc685cb8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,7 @@ jobs: steps: - name: apt-update run: + sudo apt-get install tree; #sudo apt-get update; #sudo apt install build-essential ninja-build clang; #sudo apt install cmake ccache; @@ -21,7 +22,6 @@ jobs: #sudo apt install libboost-atomic-dev libboost-all-dev; #sudo apt install python2.7-dev python-numpy python-scipy; #sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev; - echo "plop" - uses: actions/checkout@v1 - name: configure run: From afd9806963d1151bebebef06ba5a0e26e28cc3c8 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 13:58:36 +0100 Subject: [PATCH 11/30] Update main.yml temporarily simplifying cmake command --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b5cc685cb8..cb8a12c3a8d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: run: mkdir -p build; tree $PWD -L 2; - cmake -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -S "." -B "./build" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON + cmake -S . -B build #-G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON - name: make run: make -j4; From 6b4317e2ff1b13517555e73c706e663cbbcb1138 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 14:02:19 +0100 Subject: [PATCH 12/30] Update main.yml giving up with outsourced cmake generation... moving into build folder.... --- .github/workflows/main.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb8a12c3a8d..136640d7224 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,20 +14,21 @@ jobs: steps: - name: apt-update run: - sudo apt-get install tree; - #sudo apt-get update; - #sudo apt install build-essential ninja-build clang; - #sudo apt install cmake ccache; - #sudo apt install qt5-default; - #sudo apt install libboost-atomic-dev libboost-all-dev; - #sudo apt install python2.7-dev python-numpy python-scipy; - #sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev; + sudo apt-get update; + sudo apt install build-essential ninja-build clang; + sudo apt install cmake ccache; + sudo apt install qt5-default; + sudo apt install libboost-atomic-dev libboost-all-dev; + sudo apt install python2.7-dev python-numpy python-scipy; + sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev; + - uses: actions/checkout@v1 - name: configure run: mkdir -p build; - tree $PWD -L 2; - cmake -S . -B build #-G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON + cd build; + cmake .. -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON + - name: make run: make -j4; From 0e4d990e6105a9302f07de51fa2c59b5cd47baa2 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 14:06:47 +0100 Subject: [PATCH 13/30] Update main.yml using ninja, not make... --- .github/workflows/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 136640d7224..80cb9319ade 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,10 +29,11 @@ jobs: cd build; cmake .. -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON - - name: make + - name: build run: - make -j4; - make install + echo $PWD + ninja; + ninja install # run-tests: # runs-on: ubuntu-latest From 5f6eb9b67941c8e580385c3a11b9c85c995998e0 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 14:16:00 +0100 Subject: [PATCH 14/30] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 80cb9319ade..d588a6be878 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: - name: build run: - echo $PWD + cd build; ninja; ninja install From 8e020e0778145b42be57104ba50754d07903d99a Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 16:06:22 +0100 Subject: [PATCH 15/30] Update main.yml testing my new docker image n_n --- .github/workflows/main.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d588a6be878..d0e80814c91 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,16 +12,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: apt-update - run: - sudo apt-get update; - sudo apt install build-essential ninja-build clang; - sudo apt install cmake ccache; - sudo apt install qt5-default; - sudo apt install libboost-atomic-dev libboost-all-dev; - sudo apt install python2.7-dev python-numpy python-scipy; - sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev; - + - uses: docker://bmarques68/sofa-ubuntu:18.04 - uses: actions/checkout@v1 - name: configure run: From 0ccc10dafd5bf0b1200b48ce18e56584bb0555f4 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 16:11:40 +0100 Subject: [PATCH 16/30] Update main.yml attempt #2 --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d0e80814c91..2da8e915309 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,16 +10,17 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: bmarques68/sofa-ubuntu:18.04 steps: - - uses: docker://bmarques68/sofa-ubuntu:18.04 - uses: actions/checkout@v1 + - uses: docker://bmarques68/sofa-ubuntu:18.04 - name: configure run: mkdir -p build; cd build; cmake .. -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON + - uses: docker://bmarques68/sofa-ubuntu:18.04 - name: build run: cd build; From ceeb0a1fac393a22481e148bd3482a8a3a687e9c Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Tue, 26 Nov 2019 16:13:36 +0100 Subject: [PATCH 17/30] Update main.yml attempt #3 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2da8e915309..f48aa72fc9e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ on: jobs: build: - runs-on: bmarques68/sofa-ubuntu:18.04 + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - uses: docker://bmarques68/sofa-ubuntu:18.04 From ca70095476089055000703851b71c8fbba52f23c Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 10:11:34 +0100 Subject: [PATCH 18/30] Update main.yml reverting attempt to run in custom docker image... --- .github/workflows/main.yml | 63 +++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f48aa72fc9e..8b068c67055 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,25 +10,52 @@ on: jobs: build: - runs-on: ubuntu-18.04 + # I want to use a custom docker image on a self-hosted vm on ci.inria.fr, with preinstalled deps. meanwhile, let's stick to a github-hosted docker image: + runs-on: ubuntu-18.04 # [self-hosted docker://bmarques68/sofa-ubuntu:18.04] steps: + # Chechout the project's repo: - uses: actions/checkout@v1 - - uses: docker://bmarques68/sofa-ubuntu:18.04 - - name: configure - run: - mkdir -p build; - cd build; - cmake .. -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON + + # Ideally we would want to use a self-hosted docker with preinstalled deps. meanwhile, let's add a dependency step: + - name: install dependencies + run: + sudo apt-get update; + sudo apt install build-essential ninja-build clang; + sudo apt install cmake ccache; + sudo apt install qt5-default; + sudo apt install libboost-atomic-dev libboost-all-dev; + sudo apt install python2.7-dev python-numpy python-scipy; + sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev; + + - name: configure SOFA + run: | + mkdir -p build + cd build + cmake .. -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON -DPLUGIN_SOFAPYTHON=ON - - uses: docker://bmarques68/sofa-ubuntu:18.04 - - name: build - run: - cd build; - ninja; + - name: build SOFA + run: | + cd build + ninja ninja install - - # run-tests: - # runs-on: ubuntu-latest - # steps: - # - name: run-tests - # run: sh build/bin/run-tests.sh + + - name: Upload build-dir + uses: actions/upload-artifact@v1 + with: + name: build-dir + path: ./build + + run-tests: + runs-on: ubuntu-latest + steps: + - name: Download build-dir + uses: actions/download-artifact@v1 + with: + name: build-dir + - name: run-tests + run: | + cd build + for f in *_test + do + ./$f + done From 342b43b5e46f3be3fb684fbd85cd41e55520bff1 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 10:16:29 +0100 Subject: [PATCH 19/30] Update main.yml run-tests waits for build to finish successfully --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b068c67055..a4a2ca0ac5d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,6 +47,7 @@ jobs: run-tests: runs-on: ubuntu-latest + needs: [build] steps: - name: Download build-dir uses: actions/download-artifact@v1 From 60a1aabd8c8617e97603a76231953f07e737f718 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 10:28:30 +0100 Subject: [PATCH 20/30] Update main.yml --- .github/workflows/main.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a4a2ca0ac5d..a2f384e97fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,22 +10,22 @@ on: jobs: build: - # I want to use a custom docker image on a self-hosted vm on ci.inria.fr, with preinstalled deps. meanwhile, let's stick to a github-hosted docker image: - runs-on: ubuntu-18.04 # [self-hosted docker://bmarques68/sofa-ubuntu:18.04] + # ideally I'd like this to run in custom docker image instead of running directly in the self-hosted vm: + runs-on: [self-hosted ubuntu-18.04] # [self-hosted docker://bmarques68/sofa-ubuntu:18.04] steps: # Chechout the project's repo: - uses: actions/checkout@v1 - # Ideally we would want to use a self-hosted docker with preinstalled deps. meanwhile, let's add a dependency step: + # when running on a self-hosted vm with preinstalled deps this dependency step is not necessary of course...: - name: install dependencies - run: - sudo apt-get update; - sudo apt install build-essential ninja-build clang; - sudo apt install cmake ccache; - sudo apt install qt5-default; - sudo apt install libboost-atomic-dev libboost-all-dev; - sudo apt install python2.7-dev python-numpy python-scipy; - sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev; + run: | + sudo apt-get -y update + sudo apt install -y build-essential ninja-build clang + sudo apt install -y cmake ccache + sudo apt install -y qt5-default + sudo apt install -y libboost-atomic-dev libboost-all-dev + sudo apt install -y python2.7-dev python-numpy python-scipy + sudo apt install -y libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev - name: configure SOFA run: | From b1d0dbc3c267cd05d6207fa5ec65643d88e9981b Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 10:31:57 +0100 Subject: [PATCH 21/30] Update main.yml Missing comma... --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a2f384e97fc..6be61d31d1b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on: jobs: build: # ideally I'd like this to run in custom docker image instead of running directly in the self-hosted vm: - runs-on: [self-hosted ubuntu-18.04] # [self-hosted docker://bmarques68/sofa-ubuntu:18.04] + runs-on: [self-hosted, ubuntu-18.04] # [self-hosted docker://bmarques68/sofa-ubuntu:18.04] steps: # Chechout the project's repo: - uses: actions/checkout@v1 From 057d9516ebb50653e83f3a97c5dbdb870a81b978 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 10:34:08 +0100 Subject: [PATCH 22/30] Update main.yml cannot specify specific runner, just specific OS / arch type --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6be61d31d1b..f8a75468159 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on: jobs: build: # ideally I'd like this to run in custom docker image instead of running directly in the self-hosted vm: - runs-on: [self-hosted, ubuntu-18.04] # [self-hosted docker://bmarques68/sofa-ubuntu:18.04] + runs-on: [self-hosted, linux] # [self-hosted docker://bmarques68/sofa-ubuntu:18.04] steps: # Chechout the project's repo: - uses: actions/checkout@v1 From 26277d26bfa8296fc5d8a5a03c814b9f46c3413e Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 11:49:24 +0100 Subject: [PATCH 23/30] Update main.yml splitting deps, cmake config / generation, build, & tests in dedicated jobs --- .github/workflows/main.yml | 42 ++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f8a75468159..6f97071f7ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,20 @@ on: - master jobs: - build: + install-dependencies: + runs-on: [self-hosted, linux] + steps: + - name: install dependencies + run: | + sudo apt-get -y update + sudo apt install -y build-essential ninja-build clang + sudo apt install -y cmake ccache + sudo apt install -y qt5-default + sudo apt install -y libboost-atomic-dev libboost-all-dev + sudo apt install -y python2.7-dev python-numpy python-scipy + sudo apt install -y libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev + cmake: + needs: [install-dependencies] # ideally I'd like this to run in custom docker image instead of running directly in the self-hosted vm: runs-on: [self-hosted, linux] # [self-hosted docker://bmarques68/sofa-ubuntu:18.04] steps: @@ -17,45 +30,30 @@ jobs: - uses: actions/checkout@v1 # when running on a self-hosted vm with preinstalled deps this dependency step is not necessary of course...: - - name: install dependencies - run: | - sudo apt-get -y update - sudo apt install -y build-essential ninja-build clang - sudo apt install -y cmake ccache - sudo apt install -y qt5-default - sudo apt install -y libboost-atomic-dev libboost-all-dev - sudo apt install -y python2.7-dev python-numpy python-scipy - sudo apt install -y libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev - - name: configure SOFA run: | mkdir -p build cd build cmake .. -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON -DPLUGIN_SOFAPYTHON=ON + + build: + needs: [cmake] + runs-on: [self-hosted, linux] + steps: - name: build SOFA run: | cd build ninja ninja install - - name: Upload build-dir - uses: actions/upload-artifact@v1 - with: - name: build-dir - path: ./build - run-tests: runs-on: ubuntu-latest needs: [build] steps: - - name: Download build-dir - uses: actions/download-artifact@v1 - with: - name: build-dir - name: run-tests run: | - cd build + cd build/install/bin for f in *_test do ./$f From bc6e23e8f44c7001e618cb6baed8d7dee68d8b08 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 12:42:35 +0100 Subject: [PATCH 24/30] change install prefix --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6f97071f7ee..fb2f81bf1f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,7 @@ jobs: run: | mkdir -p build cd build - cmake .. -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON -DPLUGIN_SOFAPYTHON=ON + cmake .. -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON -DPLUGIN_SOFAPYTHON=ON -DCMAKE_INSTALL_PREFIX="~/SOFA" build: @@ -53,7 +53,7 @@ jobs: steps: - name: run-tests run: | - cd build/install/bin + cd ~/SOFA/bin for f in *_test do ./$f From e0136dba3b10e68fc2b3cc87406617bd668a851f Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 12:57:18 +0100 Subject: [PATCH 25/30] Update main.yml externalize build folder to avoid erasing it all every single time --- .github/workflows/main.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb2f81bf1f2..29126837432 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: sudo apt install -y libboost-atomic-dev libboost-all-dev sudo apt install -y python2.7-dev python-numpy python-scipy sudo apt install -y libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev - cmake: + build: needs: [install-dependencies] # ideally I'd like this to run in custom docker image instead of running directly in the self-hosted vm: runs-on: [self-hosted, linux] # [self-hosted docker://bmarques68/sofa-ubuntu:18.04] @@ -32,18 +32,13 @@ jobs: # when running on a self-hosted vm with preinstalled deps this dependency step is not necessary of course...: - name: configure SOFA run: | - mkdir -p build - cd build - cmake .. -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON -DPLUGIN_SOFAPYTHON=ON -DCMAKE_INSTALL_PREFIX="~/SOFA" + mkdir -p ../build + cd ../build + cmake ../sofa -G Ninja -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DSOFA_BUILD_METIS=ON -DPLUGIN_SOFASPARSESOLVER=ON -DPLUGIN_SOFAPYTHON=ON -DCMAKE_INSTALL_PREFIX="~/SOFA" - - build: - needs: [cmake] - runs-on: [self-hosted, linux] - steps: - name: build SOFA run: | - cd build + cd ../build ninja ninja install From e5afb513c33bea2bca84a25882fa1090cb903527 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 13:51:21 +0100 Subject: [PATCH 26/30] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 29126837432..979b0ecc20c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,7 +48,7 @@ jobs: steps: - name: run-tests run: | - cd ~/SOFA/bin + cd /builds/SOFA/bin for f in *_test do ./$f From 3b385f0b245ee82bafea34f2061985c11be437aa Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 13:55:06 +0100 Subject: [PATCH 27/30] Update main.yml fix tests to run on self-hosted vm --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 979b0ecc20c..47dfa0454db 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,12 +43,12 @@ jobs: ninja install run-tests: - runs-on: ubuntu-latest + runs-on: [self-hosted, linux] needs: [build] steps: - name: run-tests run: | - cd /builds/SOFA/bin + cd ~/SOFA/bin for f in *_test do ./$f From db2c57e2281fd4102b62d0b4a17d9e01c0bc0b27 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 14:02:26 +0100 Subject: [PATCH 28/30] Update main.yml tests not deployed during install... so running them in build/bin --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 47dfa0454db..f41b74e5dd7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,12 +43,12 @@ jobs: ninja install run-tests: - runs-on: [self-hosted, linux] needs: [build] + runs-on: [self-hosted, linux] steps: - name: run-tests run: | - cd ~/SOFA/bin + cd ../build/bin for f in *_test do ./$f From bfeed7b2c53cecbbcd26382ba49e405108a69fb2 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Wed, 27 Nov 2019 14:11:16 +0100 Subject: [PATCH 29/30] Update main.yml commenting out dependencies install (not required on a self-hosted workflow --- .github/workflows/main.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f41b74e5dd7..2f58c820c32 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,20 +9,20 @@ on: - master jobs: - install-dependencies: - runs-on: [self-hosted, linux] - steps: - - name: install dependencies - run: | - sudo apt-get -y update - sudo apt install -y build-essential ninja-build clang - sudo apt install -y cmake ccache - sudo apt install -y qt5-default - sudo apt install -y libboost-atomic-dev libboost-all-dev - sudo apt install -y python2.7-dev python-numpy python-scipy - sudo apt install -y libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev +# install-dependencies: +# runs-on: [self-hosted, linux] +# steps: +# - name: install dependencies +# run: | +# sudo apt-get -y update +# sudo apt install -y build-essential ninja-build clang +# sudo apt install -y cmake ccache +# sudo apt install -y qt5-default +# sudo apt install -y libboost-atomic-dev libboost-all-dev +# sudo apt install -y python2.7-dev python-numpy python-scipy +# sudo apt install -y libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev build: - needs: [install-dependencies] +# needs: [install-dependencies] # ideally I'd like this to run in custom docker image instead of running directly in the self-hosted vm: runs-on: [self-hosted, linux] # [self-hosted docker://bmarques68/sofa-ubuntu:18.04] steps: From e86a548004494b661e5747309cb8f7507321ffde Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Thu, 28 Nov 2019 15:39:59 +0100 Subject: [PATCH 30/30] testing second workflow --- .github/workflows/tests.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000000..581d3945272 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,17 @@ +name: test-workflow + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + plop: + runs-on: [self-hosted, linux] + needs: [build] + steps: + - name: plop + run: echo "pouet pouet"