From b55e372b77f69ca4c6b2f203128be1a29036046a Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Tue, 20 Jul 2021 23:07:04 -0400 Subject: [PATCH 1/3] GitHub Actions now sets env var CI also, CI environemnt variable does not appear to be used anywhere. --- .github/workflows/CI.yml | 1 - .github/workflows/ci_windows.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5fb75e4a8..a265aa76b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,7 +3,6 @@ name: CI on: [push, pull_request] env: - CI: "ON" # We can detect this in the build system and other vendors implement it CMAKE_BUILD_PARALLEL_LEVEL: "2" # 2 cores on each GHA VM, enable parallel builds CTEST_OUTPUT_ON_FAILURE: "ON" # This way we don't need a flag to ctest CTEST_PARALLEL_LEVEL: "2" diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 5da442f59..02b4c8c93 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -3,7 +3,6 @@ name: CI_windows on: [push, pull_request] env: - CI: "ON" CTEST_TIME_TIMEOUT: "5" # some failures hang forever jobs: From edd0efbb65e51b5d693d228735193c8ac2ff92be Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Tue, 20 Jul 2021 23:08:06 -0400 Subject: [PATCH 2/3] github actions recommends checkout@v2 --- .github/workflows/CI.yml | 4 ++-- .github/workflows/PR-review.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a265aa76b..af4f07a39 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Set up Python 3.x uses: actions/setup-python@v1 # Use pip to install latest CMake, & FORD/Jin2For, etc. @@ -109,7 +109,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Set up Python 3.x uses: actions/setup-python@v1 diff --git a/.github/workflows/PR-review.yml b/.github/workflows/PR-review.yml index 06e77ffb4..c16d0ee54 100644 --- a/.github/workflows/PR-review.yml +++ b/.github/workflows/PR-review.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code. - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: misspell uses: reviewdog/action-misspell@v1 with: From 3bcd24df6199a300bd2e1b488a0bc6549d373dcb Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Tue, 20 Jul 2021 23:15:26 -0400 Subject: [PATCH 3/3] CI: use contemporary CMake commands, remove deprecated parameters --- .github/workflows/CI.yml | 5 ++--- .github/workflows/ci_windows.yml | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index af4f07a39..4781ddd22 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -66,15 +66,14 @@ jobs: -S . -B build - name: Build and compile - run: cmake --build build + run: cmake --build build --parallel - name: catch build fail run: cmake --build build --verbose --parallel 1 if: failure() - name: test - run: ctest --parallel --output-on-failure - working-directory: build + run: ctest --test-dir build --parallel --output-on-failure - name: Install project run: cmake --install build diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 02b4c8c93..1808fea45 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -4,6 +4,7 @@ on: [push, pull_request] env: CTEST_TIME_TIMEOUT: "5" # some failures hang forever + CMAKE_GENERATOR: Ninja jobs: msys2-build: @@ -57,8 +58,7 @@ jobs: run: pip install fypp - run: >- - cmake -G Ninja - -DCMAKE_SH="CMAKE_SH-NOTFOUND" + cmake -Wdev -B build -DCMAKE_BUILD_TYPE=Debug @@ -78,8 +78,7 @@ jobs: if: failure() - name: CTest - run: ctest --output-on-failure --parallel -V -LE quadruple_precision - working-directory: build + run: ctest --test-dir build --output-on-failure --parallel -V -LE quadruple_precision - uses: actions/upload-artifact@v1 if: failure()