From e7c852fe460044ce968cb15d9461661c4b884850 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 07:04:33 -0500 Subject: [PATCH 01/13] Update macos-14 to use clang-16 and update OS choices for linting --- .github/workflows/code-linting-checks.yaml | 13 +++--------- .github/workflows/unit-tests.yaml | 24 +++++++++++++--------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/code-linting-checks.yaml b/.github/workflows/code-linting-checks.yaml index 195cf21d..908f7c97 100644 --- a/.github/workflows/code-linting-checks.yaml +++ b/.github/workflows/code-linting-checks.yaml @@ -21,8 +21,8 @@ jobs: strategy: matrix: os: - - "macos-latest" - - "ubuntu-latest" + - "macos-15" + - "ubuntu-24.04" runs-on: "${{matrix.os}}" steps: - uses: "actions/checkout@v4" @@ -37,17 +37,10 @@ jobs: shell: "bash" run: "npm install -g @go-task/cli" - - if: "matrix.os == 'macos-latest'" + - if: "matrix.os == 'macos-15'" name: "Install coreutils (for md5sum)" run: "brew install coreutils" - - name: "Log tool versions" - run: |- - md5sum --version - python --version - tar --version - task --version - - name: "Run lint task" shell: "bash" run: "task lint:check" diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 3e3b37e4..d409b7fa 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -21,7 +21,8 @@ jobs: strategy: matrix: os: - - "macos-latest" + - "macos-14" + - "macos-15" - "ubuntu-20.04" - "ubuntu-22.04" - "ubuntu-24.04" @@ -39,10 +40,17 @@ jobs: shell: "bash" run: "npm install -g @go-task/cli" - - if: "matrix.os == 'macos-latest'" + - if: "matrix.os == 'macos-14' || matrix.os == 'macos-15'" name: "Install coreutils (for md5sum)" run: "brew install coreutils" + - if: "matrix.os == 'macos-14'" + name: "Install clang-16 (for c++20)" + run: |- + brew install llvm@16 + echo "export CC=/opt/homebrew/opt/llvm@16/bin/clang" >> /Users/runner/.bashrc + echo "export CXX=/opt/homebrew/opt/llvm@16/bin/clang++" >> /Users/runner/.bashrc + - if: "matrix.os == 'ubuntu-20.04'" name: "Install gcc-10 (for c++20)" run: |- @@ -54,12 +62,8 @@ jobs: sudo ln --symbolic --force /usr/bin/g++-10 /usr/bin/c++ sudo ln --symbolic --force /usr/bin/cpp-10 /usr/bin/cpp - - name: "Log tool versions" - run: |- - command -v md5sum - command -v python - command -v tar - command -v task - - name: "Run unit tests" - run: "task test-all" + run: |- + source ~/.bashrc + task clean + task test-all From b2ab2388aff8199b4fe7b356666b507889db1d53 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 15:31:03 -0500 Subject: [PATCH 02/13] Drop Ubuntu 20.04. Use workflow env vars --- .github/workflows/unit-tests.yaml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index d409b7fa..f96011b0 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -23,7 +23,6 @@ jobs: os: - "macos-14" - "macos-15" - - "ubuntu-20.04" - "ubuntu-22.04" - "ubuntu-24.04" runs-on: "${{matrix.os}}" @@ -45,25 +44,17 @@ jobs: run: "brew install coreutils" - if: "matrix.os == 'macos-14'" - name: "Install clang-16 (for c++20)" + name: "Run unit tests" + env: + CC: "/opt/homebrew/opt/llvm@16/bin/clang" + CXX: "/opt/homebrew/opt/llvm@16/bin/clang++" run: |- brew install llvm@16 - echo "export CC=/opt/homebrew/opt/llvm@16/bin/clang" >> /Users/runner/.bashrc - echo "export CXX=/opt/homebrew/opt/llvm@16/bin/clang++" >> /Users/runner/.bashrc - - - if: "matrix.os == 'ubuntu-20.04'" - name: "Install gcc-10 (for c++20)" - run: |- - sudo apt-get update - sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ - g++-10 \ - gcc-10 - sudo ln --symbolic --force /usr/bin/gcc-10 /usr/bin/cc - sudo ln --symbolic --force /usr/bin/g++-10 /usr/bin/c++ - sudo ln --symbolic --force /usr/bin/cpp-10 /usr/bin/cpp + task clean + task test-all - - name: "Run unit tests" + - if: "false == (matrix.os == 'macos-14')" + name: "Run unit tests" run: |- - source ~/.bashrc task clean task test-all From 05841736a37db4fe4251df294f18fc4711e721c6 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 15:33:38 -0500 Subject: [PATCH 03/13] Test removing installing coreutils --- .github/workflows/code-linting-checks.yaml | 4 ---- .github/workflows/unit-tests.yaml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/.github/workflows/code-linting-checks.yaml b/.github/workflows/code-linting-checks.yaml index 908f7c97..cc757fed 100644 --- a/.github/workflows/code-linting-checks.yaml +++ b/.github/workflows/code-linting-checks.yaml @@ -37,10 +37,6 @@ jobs: shell: "bash" run: "npm install -g @go-task/cli" - - if: "matrix.os == 'macos-15'" - name: "Install coreutils (for md5sum)" - run: "brew install coreutils" - - name: "Run lint task" shell: "bash" run: "task lint:check" diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index f96011b0..62da5590 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -39,10 +39,6 @@ jobs: shell: "bash" run: "npm install -g @go-task/cli" - - if: "matrix.os == 'macos-14' || matrix.os == 'macos-15'" - name: "Install coreutils (for md5sum)" - run: "brew install coreutils" - - if: "matrix.os == 'macos-14'" name: "Run unit tests" env: From 55e7f61153bad19ff08c947924b6d6be3fe58b06 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 15:43:27 -0500 Subject: [PATCH 04/13] Add back md5sum for macos14 --- .github/workflows/unit-tests.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 62da5590..d5039058 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -40,17 +40,17 @@ jobs: run: "npm install -g @go-task/cli" - if: "matrix.os == 'macos-14'" - name: "Run unit tests" - env: - CC: "/opt/homebrew/opt/llvm@16/bin/clang" - CXX: "/opt/homebrew/opt/llvm@16/bin/clang++" + name: "Install MacOS-14 deps: coreutils (for md5sum) and AppleClang16 (for c++20)" run: |- + brew install coreutils brew install llvm@16 - task clean - task test-all - - if: "false == (matrix.os == 'macos-14')" - name: "Run unit tests" + - name: "Run unit tests" + env: + CC: >- + ${{ if eq(matrix.os, "macos-14") }} ? "/opt/homebrew/opt/llvm@16/bin/clang" : "" + CXX: >- + ${{ if eq(matrix.os, "macos-14") }} ? "/opt/homebrew/opt/llvm@16/bin/clang++" : "" run: |- task clean task test-all From 6f6acc6c9f7a2c8a3664224a95e478953e5fd089 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 15:57:58 -0500 Subject: [PATCH 05/13] Fix bug --- .github/workflows/unit-tests.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index d5039058..cca8bfb7 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -45,12 +45,17 @@ jobs: brew install coreutils brew install llvm@16 - - name: "Run unit tests" + - if: "matrix.os == 'macos-14'" + name: "Run unit tests" env: - CC: >- - ${{ if eq(matrix.os, "macos-14") }} ? "/opt/homebrew/opt/llvm@16/bin/clang" : "" - CXX: >- - ${{ if eq(matrix.os, "macos-14") }} ? "/opt/homebrew/opt/llvm@16/bin/clang++" : "" + CC: "/opt/homebrew/opt/llvm@16/bin/clang" + CXX: "/opt/homebrew/opt/llvm@16/bin/clang++" + run: |- + task clean + task test-all + + - if: "false == (matrix.os == 'macos-14')" + name: "Run unit tests" run: |- task clean task test-all From 920ca5e8b6ed75a33931e9a32115edf1959bb148 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 16:00:24 -0500 Subject: [PATCH 06/13] Use ternery operator --- .github/workflows/unit-tests.yaml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index cca8bfb7..e3fa7e3a 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -45,17 +45,10 @@ jobs: brew install coreutils brew install llvm@16 - - if: "matrix.os == 'macos-14'" - name: "Run unit tests" + - name: "Run unit tests" env: - CC: "/opt/homebrew/opt/llvm@16/bin/clang" - CXX: "/opt/homebrew/opt/llvm@16/bin/clang++" - run: |- - task clean - task test-all - - - if: "false == (matrix.os == 'macos-14')" - name: "Run unit tests" - run: |- + CC: "${{ matrix.os == 'macos-14' && '/opt/homebrew/opt/llvm@16/bin/clang' || '' }}" + CXX: "${{ matrix.os == 'macos-14' && '/opt/homebrew/opt/llvm@16/bin/clang++' || '' }}" + run: | task clean task test-all From dc895ed7355a88105c55552cf4749bca02a7ff74 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 16:02:58 -0500 Subject: [PATCH 07/13] Style fix --- .github/workflows/unit-tests.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index e3fa7e3a..7ba9ed43 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -39,7 +39,7 @@ jobs: shell: "bash" run: "npm install -g @go-task/cli" - - if: "matrix.os == 'macos-14'" + - if: "'macos-14' == matrix.os" name: "Install MacOS-14 deps: coreutils (for md5sum) and AppleClang16 (for c++20)" run: |- brew install coreutils @@ -47,8 +47,8 @@ jobs: - name: "Run unit tests" env: - CC: "${{ matrix.os == 'macos-14' && '/opt/homebrew/opt/llvm@16/bin/clang' || '' }}" - CXX: "${{ matrix.os == 'macos-14' && '/opt/homebrew/opt/llvm@16/bin/clang++' || '' }}" + CC: "${{ 'macos-14' == matrix.os && '/opt/homebrew/opt/llvm@16/bin/clang' || '' }}" + CXX: "${{ 'macos-14' == matrix.os && '/opt/homebrew/opt/llvm@16/bin/clang++' || '' }}" run: | task clean task test-all From 5e40ed1b7ff52f5afcd8ebf96fb2279d1f776b65 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 17:36:15 -0500 Subject: [PATCH 08/13] Apply suggestions from code review Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> --- .github/workflows/unit-tests.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 7ba9ed43..e622365a 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -40,15 +40,21 @@ jobs: run: "npm install -g @go-task/cli" - if: "'macos-14' == matrix.os" - name: "Install MacOS-14 deps: coreutils (for md5sum) and AppleClang16 (for c++20)" + name: "Install MacOS 14 deps: coreutils (for md5sum) and Apple Clang 16 (for C++20)" run: |- brew install coreutils brew install llvm@16 - name: "Run unit tests" - env: - CC: "${{ 'macos-14' == matrix.os && '/opt/homebrew/opt/llvm@16/bin/clang' || '' }}" - CXX: "${{ 'macos-14' == matrix.os && '/opt/homebrew/opt/llvm@16/bin/clang++' || '' }}" - run: | + env: >- + ${{ + 'macos-14' == matrix.os + && fromJson('{ + "CC": "/opt/homebrew/opt/llvm@16/bin/clang", + "CXX": "/opt/homebrew/opt/llvm@16/bin/clang++" + }') + || {} + }} + run: |- task clean task test-all From c25858824197d8a31a41ba0199a71bae6520fad0 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 17:40:05 -0500 Subject: [PATCH 09/13] Address code review --- .github/workflows/unit-tests.yaml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index e622365a..5bede725 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -45,16 +45,13 @@ jobs: brew install coreutils brew install llvm@16 + - if: "'macos-14' == matrix.os" - name: "Run unit tests" - env: >- - ${{ - 'macos-14' == matrix.os - && fromJson('{ - "CC": "/opt/homebrew/opt/llvm@16/bin/clang", - "CXX": "/opt/homebrew/opt/llvm@16/bin/clang++" - }') - || {} - }} - run: |- - task clean - task test-all + env: + CC: "/opt/homebrew/opt/llvm@16/bin/clang" + CXX: "/opt/homebrew/opt/llvm@16/bin/clang++" + run: "task test-all" + + - if: "false == ('macos-14' == matrix.os)" + - name: "Run unit tests" + run: "task test-all" From bef12dfa162cefd46cff5b101792e6d89a800443 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 17:41:47 -0500 Subject: [PATCH 10/13] Rename step --- .github/workflows/unit-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 5bede725..e5ce6f83 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -46,7 +46,7 @@ jobs: brew install llvm@16 - if: "'macos-14' == matrix.os" - - name: "Run unit tests" + - name: "Run macos-14 unit tests" env: CC: "/opt/homebrew/opt/llvm@16/bin/clang" CXX: "/opt/homebrew/opt/llvm@16/bin/clang++" From 549e1cf715a7ec0615f8006d04a4703a0c8e28f6 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 17:45:09 -0500 Subject: [PATCH 11/13] Fix yaml --- .github/workflows/unit-tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index e5ce6f83..1f0689ac 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -46,12 +46,12 @@ jobs: brew install llvm@16 - if: "'macos-14' == matrix.os" - - name: "Run macos-14 unit tests" + name: "Run unit tests" env: CC: "/opt/homebrew/opt/llvm@16/bin/clang" CXX: "/opt/homebrew/opt/llvm@16/bin/clang++" run: "task test-all" - if: "false == ('macos-14' == matrix.os)" - - name: "Run unit tests" + name: "Run unit tests" run: "task test-all" From 22d3089fb7c0b215da082b7bbcfe5c7e69d0f1cc Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 18:59:20 -0500 Subject: [PATCH 12/13] Try solution --- .github/workflows/unit-tests.yaml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 1f0689ac..57438c54 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -45,13 +45,14 @@ jobs: brew install coreutils brew install llvm@16 - - if: "'macos-14' == matrix.os" - name: "Run unit tests" - env: - CC: "/opt/homebrew/opt/llvm@16/bin/clang" - CXX: "/opt/homebrew/opt/llvm@16/bin/clang++" - run: "task test-all" - - - if: "false == ('macos-14' == matrix.os)" - name: "Run unit tests" + - name: "Run unit tests" + env: >- + ${{ + 'macos-14' == matrix.os + && fromJson('{ + "CC": "/opt/homebrew/opt/llvm@16/bin/clang", + "CXX": "/opt/homebrew/opt/llvm@16/bin/clang++" + }') + || fromJson('{}') + }} run: "task test-all" From da15730f33240d6ac83988d88631ad0252cc34be Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Tue, 25 Feb 2025 23:30:38 -0500 Subject: [PATCH 13/13] Update .github/workflows/unit-tests.yaml Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> --- .github/workflows/unit-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 57438c54..48b9435b 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -40,7 +40,7 @@ jobs: run: "npm install -g @go-task/cli" - if: "'macos-14' == matrix.os" - name: "Install MacOS 14 deps: coreutils (for md5sum) and Apple Clang 16 (for C++20)" + name: "Install macOS 14 deps: coreutils (for md5sum) and Apple Clang 16 (for C++20)" run: |- brew install coreutils brew install llvm@16