From 7009f04967fc5b6416bae88a6c1d808fe059b84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 15:24:13 +0200 Subject: [PATCH 01/16] CI: setup GH-Acitons for windows builds --- .github/workflows/main.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 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 00000000..38f7db9d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,38 @@ +name: Continuous Integration + +on: + push: + branches: + - "master" + tags: + - "*" + pull_request: + branches: + - "master" + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + + build_win: + name: Build on Windows + runs-on: windows-2019 + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: '0' + + - name: Setup msbuild.exe + uses: microsoft/setup-msbuild@v1.0.2 + with: + vs-version: '[15.0,16.0)' + + - name: Build OGS5 + run: | + cmake -B build -S . -DCMAKE_BUILD_TYPE=Release + cmake --build build/ --config Release -j + + - uses: actions/upload-artifact@v2 + with: + path: ./build/bin/* From 8c3563b4f31fca9f6eeaf456b3664eec7471ca4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 15:25:52 +0200 Subject: [PATCH 02/16] CI: bugfix from copy-pasta --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38f7db9d..f3a24817 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,7 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +jobs: build_win: name: Build on Windows runs-on: windows-2019 From da9c9d8725d1876c7ab0cd0f9ffa31878c7e7590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 15:35:35 +0200 Subject: [PATCH 03/16] CI: use windows-2016 to get VS2017 --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f3a24817..8db6a2f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ on: jobs: build_win: name: Build on Windows - runs-on: windows-2019 + runs-on: windows-2016 strategy: fail-fast: false @@ -26,8 +26,6 @@ jobs: - name: Setup msbuild.exe uses: microsoft/setup-msbuild@v1.0.2 - with: - vs-version: '[15.0,16.0)' - name: Build OGS5 run: | From 9d7d7e4260bed45c80e461da4398a2d02d34214e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 16:05:38 +0200 Subject: [PATCH 04/16] CI: add builds for win2019, linux and macOS --- .github/workflows/main.yml | 53 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8db6a2f6..98ece3af 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,19 +15,22 @@ on: jobs: build_win: name: Build on Windows - runs-on: windows-2016 strategy: + matrix: + os: [windows-2016, windows-2019] fail-fast: false + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 with: fetch-depth: '0' + submodules: recursive - name: Setup msbuild.exe uses: microsoft/setup-msbuild@v1.0.2 - - name: Build OGS5 + - name: Build OGS5-FEM run: | cmake -B build -S . -DCMAKE_BUILD_TYPE=Release cmake --build build/ --config Release -j @@ -35,3 +38,49 @@ jobs: - uses: actions/upload-artifact@v2 with: path: ./build/bin/* + + build_linux: + name: Build on Linux + strategy: + matrix: + os: [ubuntu-18.04, ubuntu-20.04] + fail-fast: false + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: '0' + submodules: recursive + + - name: Build OGS5-FEM + run: | + cmake -B build -S . -DOGS_USE_CVODE=ON -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release + cmake --build build/ --config Release -j + + - uses: actions/upload-artifact@v2 + with: + path: ./build/bin/* + + build_macOS: + name: Build on macOS + strategy: + matrix: + os: [macos-10.15] + fail-fast: false + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: '0' + submodules: recursive + + - name: Build OGS5-FEM + run: | + cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release + cmake --build build/ --config Release -j + + - uses: actions/upload-artifact@v2 + with: + path: ./build/bin/* From 5feb35d856a03759a4e4bd681cc4ce86e6ba76cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 16:19:32 +0200 Subject: [PATCH 05/16] CI: fix broken macOS build by specifying C++11 --- .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 98ece3af..a2999019 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -78,7 +78,7 @@ jobs: - name: Build OGS5-FEM run: | - cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release + cmake -B build -S . -DCMAKE_CXX_FLAGS=-std=c++11 -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build build/ --config Release -j - uses: actions/upload-artifact@v2 From 37b2aad8857739f23a20a2a44a89fb7f24d22cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 16:32:07 +0200 Subject: [PATCH 06/16] CI: fix broken macOS build by specifying C++0x --- .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 a2999019..c8ab4ed0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -78,7 +78,7 @@ jobs: - name: Build OGS5-FEM run: | - cmake -B build -S . -DCMAKE_CXX_FLAGS=-std=c++11 -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release + cmake -B build -S . -DCMAKE_CXX_FLAGS=-std=c++0x -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build build/ --config Release -j - uses: actions/upload-artifact@v2 From ce01007e62442e274f5eb74c219970879e12b72b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 16:37:12 +0200 Subject: [PATCH 07/16] CI: fix broken macOS build by specifying C++14 --- .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 c8ab4ed0..9901498e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -78,7 +78,7 @@ jobs: - name: Build OGS5-FEM run: | - cmake -B build -S . -DCMAKE_CXX_FLAGS=-std=c++0x -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release + cmake -B build -S . -DCMAKE_CXX_FLAGS=-std=c++14 -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build build/ --config Release -j - uses: actions/upload-artifact@v2 From 4dfaeaca67c77c51e3cb53e3390ad788240f02e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 16:43:42 +0200 Subject: [PATCH 08/16] CI: fix broken macOS build by using gcc instead of clang --- .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 9901498e..4396b00c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -78,7 +78,7 @@ jobs: - name: Build OGS5-FEM run: | - cmake -B build -S . -DCMAKE_CXX_FLAGS=-std=c++14 -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release + CC=gcc-9 cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build build/ --config Release -j - uses: actions/upload-artifact@v2 From 5ccabf10a2aa232c90f2e61ba4e298294f1dbe68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 16:49:20 +0200 Subject: [PATCH 09/16] CI: fix broken macOS build by specifying C++11 with gcc --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4396b00c..ad728be8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,8 +77,10 @@ jobs: submodules: recursive - name: Build OGS5-FEM + env: + CC: gcc-9 run: | - CC=gcc-9 cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release + cmake -B build -S . -DCMAKE_CXX_FLAGS=-std=c++11 -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build build/ --config Release -j - uses: actions/upload-artifact@v2 From 650b2f38bee1a08a1caedefcbb26c987b303ab64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 16:56:31 +0200 Subject: [PATCH 10/16] CI: fix broken macOS build by using g++ instead of clang --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad728be8..f67a51f7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,8 +79,9 @@ jobs: - name: Build OGS5-FEM env: CC: gcc-9 + CXX: g++-9 run: | - cmake -B build -S . -DCMAKE_CXX_FLAGS=-std=c++11 -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release + cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build build/ --config Release -j - uses: actions/upload-artifact@v2 From 4137b7c3b8dac4e63461849854e00dbd8d9edcfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 17:16:18 +0200 Subject: [PATCH 11/16] CI: separate artifacts for all platforms --- .github/workflows/main.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f67a51f7..96d9ca1b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,8 @@ jobs: - uses: actions/upload-artifact@v2 with: - path: ./build/bin/* + name: ${{ matrix.os }} + path: ./build/bin/ build_linux: name: Build on Linux @@ -60,7 +61,8 @@ jobs: - uses: actions/upload-artifact@v2 with: - path: ./build/bin/* + name: ${{ matrix.os }} + path: ./build/bin/ build_macOS: name: Build on macOS @@ -86,4 +88,5 @@ jobs: - uses: actions/upload-artifact@v2 with: - path: ./build/bin/* + name: ${{ matrix.os }} + path: ./build/bin/ From 400b67131227d989c7edf847c56b051bd565272c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 21 Jun 2021 17:39:37 +0200 Subject: [PATCH 12/16] CI: use package target for artifacts --- .github/workflows/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 96d9ca1b..64d60d7e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,12 +33,12 @@ jobs: - name: Build OGS5-FEM run: | cmake -B build -S . -DCMAKE_BUILD_TYPE=Release - cmake --build build/ --config Release -j + cmake --build build/ --config Release -j --target package - uses: actions/upload-artifact@v2 with: name: ${{ matrix.os }} - path: ./build/bin/ + path: ./build/ogs-*.zip build_linux: name: Build on Linux @@ -56,13 +56,13 @@ jobs: - name: Build OGS5-FEM run: | - cmake -B build -S . -DOGS_USE_CVODE=ON -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release - cmake --build build/ --config Release -j + cmake -B build -S . -DOGS_CPU_ARCHITECTURE=generic -DOGS_USE_CVODE=ON -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release + cmake --build build/ --config Release -j --target package - uses: actions/upload-artifact@v2 with: name: ${{ matrix.os }} - path: ./build/bin/ + path: ./build/ogs-*.tar.gz build_macOS: name: Build on macOS @@ -84,9 +84,9 @@ jobs: CXX: g++-9 run: | cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release - cmake --build build/ --config Release -j + cmake --build build/ --config Release -j --target package - uses: actions/upload-artifact@v2 with: name: ${{ matrix.os }} - path: ./build/bin/ + path: ./build/ogs-*.tar.gz From fc85fd030d8a95587c54355a2c18917917af82d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 9 May 2022 11:09:56 +0200 Subject: [PATCH 13/16] CI: check more OS, use gcc-10 --- .github/workflows/main.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 64d60d7e..560fffce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: name: Build on Windows strategy: matrix: - os: [windows-2016, windows-2019] + os: [windows-2016, windows-2019, windows-2022] fail-fast: false runs-on: ${{ matrix.os }} @@ -28,7 +28,7 @@ jobs: submodules: recursive - name: Setup msbuild.exe - uses: microsoft/setup-msbuild@v1.0.2 + uses: microsoft/setup-msbuild@v1.1 - name: Build OGS5-FEM run: | @@ -55,6 +55,9 @@ jobs: submodules: recursive - name: Build OGS5-FEM + env: + CC: gcc-10 + CXX: g++-10 run: | cmake -B build -S . -DOGS_CPU_ARCHITECTURE=generic -DOGS_USE_CVODE=ON -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build build/ --config Release -j --target package @@ -68,7 +71,7 @@ jobs: name: Build on macOS strategy: matrix: - os: [macos-10.15] + os: [macos-10.15, macos-11, macos-12] fail-fast: false runs-on: ${{ matrix.os }} @@ -80,8 +83,8 @@ jobs: - name: Build OGS5-FEM env: - CC: gcc-9 - CXX: g++-9 + CC: gcc-10 + CXX: g++-10 run: | cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build build/ --config Release -j --target package From e78612d190dadbde16e9a739881772c6fd293718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 9 May 2022 11:14:01 +0200 Subject: [PATCH 14/16] CI: remove win2016; use gcc-11 on MacOS --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 560fffce..4d7c0640 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: name: Build on Windows strategy: matrix: - os: [windows-2016, windows-2019, windows-2022] + os: [windows-2019, windows-2022] fail-fast: false runs-on: ${{ matrix.os }} @@ -83,8 +83,8 @@ jobs: - name: Build OGS5-FEM env: - CC: gcc-10 - CXX: g++-10 + CC: gcc-11 + CXX: g++-11 run: | cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build build/ --config Release -j --target package From 7d9629f336510d61909f444e43c0ee7ab9c009b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 9 May 2022 11:22:48 +0200 Subject: [PATCH 15/16] CI: use gcc-10 for MacOS<12 --- .github/workflows/main.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4d7c0640..979b213f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,9 +71,12 @@ jobs: name: Build on macOS strategy: matrix: - os: [macos-10.15, macos-11, macos-12] + cfg: + - { os: macos-10.15, gcc: 10 } + - { os: macos-11, gcc: 10 } + - { os: macos-12, gcc: 11 } fail-fast: false - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.cfg.os }} steps: - uses: actions/checkout@v2 @@ -83,13 +86,13 @@ jobs: - name: Build OGS5-FEM env: - CC: gcc-11 - CXX: g++-11 + CC: gcc-${{ matrix.cfg.gcc }} + CXX: g++-${{ matrix.cfg.gcc }} run: | cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build build/ --config Release -j --target package - uses: actions/upload-artifact@v2 with: - name: ${{ matrix.os }} + name: ${{ matrix.cfg.os }} path: ./build/ogs-*.tar.gz From 7174a10dd5895ec1a030a2b94b27b6c8ac91d8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 9 May 2022 11:41:09 +0200 Subject: [PATCH 16/16] CI: MacOS stick to -std=c++14 with gcc-11 --- .github/workflows/main.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 979b213f..f9a76077 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,12 +71,9 @@ jobs: name: Build on macOS strategy: matrix: - cfg: - - { os: macos-10.15, gcc: 10 } - - { os: macos-11, gcc: 10 } - - { os: macos-12, gcc: 11 } + os: [macos-10.15, macos-11, macos-12] fail-fast: false - runs-on: ${{ matrix.cfg.os }} + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -86,13 +83,13 @@ jobs: - name: Build OGS5-FEM env: - CC: gcc-${{ matrix.cfg.gcc }} - CXX: g++-${{ matrix.cfg.gcc }} + CC: gcc-11 + CXX: g++-11 run: | - cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release + cmake -B build -S . -DOGS_NO_EXTERNAL_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14 cmake --build build/ --config Release -j --target package - uses: actions/upload-artifact@v2 with: - name: ${{ matrix.cfg.os }} + name: ${{ matrix.os }} path: ./build/ogs-*.tar.gz