From 3d3b4cc2ef9dc7f37a724138d93de1b0340ea3ec Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 15:13:36 +0900 Subject: [PATCH 01/12] Add failing test for arm --- .github/workflows/build.yml | 3 ++- .github/workflows/mise.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7b9ef7..946f406 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,8 @@ jobs: matrix: os: - ubuntu-latest - - macos-latest + - macos-14 # M1 + - macos-13 # Intel target: - tool-version: 'latest' command: 'makers --version && cargo-make make --version' diff --git a/.github/workflows/mise.yml b/.github/workflows/mise.yml index d21cf89..c7c5bfb 100644 --- a/.github/workflows/mise.yml +++ b/.github/workflows/mise.yml @@ -22,7 +22,8 @@ jobs: matrix: os: - ubuntu-latest - - macos-latest + - macos-14 # M1 + - macos-13 # Intel target: - command: | mise install cargo-make@latest From f45cdc5120f78c5d919a584b23651fe8862b62ed Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 15:19:59 +0900 Subject: [PATCH 02/12] This will work in latest cargo-make version, but older may not have binary releases --- lib/utils.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.bash b/lib/utils.bash index 71f9216..35e7167 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -66,7 +66,7 @@ download_release() { case "$(uname -m)" in x86_64*) architecture="x86_64" ;; - aarch64 | arm64) fail "Unsupported architecture for now. See https://github.com/sagiegurari/cargo-make/issues/738" ;; + aarch64 | arm64) architecture="aarch64" ;; *) fail "Unsupported architecture" ;; esac From 4f89cf570fd2b9b184e6494738d726ff9f679e16 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 15:38:12 +0900 Subject: [PATCH 03/12] Update CI to ignore old versions in M1 mac --- .github/workflows/build.yml | 9 +++++++++ lib/utils.bash | 1 + 2 files changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 946f406..481a450 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,11 +28,20 @@ jobs: target: - tool-version: 'latest' command: 'makers --version && cargo-make make --version' + # They are releasing aarch64 binary since 0.36.7: https://github.com/sagiegurari/cargo-make/commit/ab3cac2261c0ba67ab6d7a277aff8252faec0b1c + - tool-version: '0.36.7' + command: 'makers --version && cargo-make make --version' + # Supporting olderst # https://github.com/kachick/asdf-cargo-make/blob/8a7095692e6a880568a5b48c441ea518ef6a61cb/bin/download#L12 # https://github.com/kachick/asdf-cargo-make/blob/8a7095692e6a880568a5b48c441ea518ef6a61cb/lib/utils.bash#L59-L61 - tool-version: '0.16.0' # makers does not exist command: 'cargo-make make --version' + exclude: + # They are releasing aarch64 binary since 0.36.7: https://github.com/sagiegurari/cargo-make/commit/ab3cac2261c0ba67ab6d7a277aff8252faec0b1c + - os: macos-14 + target: + - tool-version: '0.16.0' runs-on: ${{ matrix.os }} steps: - uses: asdf-vm/actions/plugin-test@v3 diff --git a/lib/utils.bash b/lib/utils.bash index 35e7167..6a40c9a 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -66,6 +66,7 @@ download_release() { case "$(uname -m)" in x86_64*) architecture="x86_64" ;; + # They are releasing aarch64 binary since 0.36.7: https://github.com/sagiegurari/cargo-make/commit/ab3cac2261c0ba67ab6d7a277aff8252faec0b1c aarch64 | arm64) architecture="aarch64" ;; *) fail "Unsupported architecture" ;; esac From 75231595bb2d1ae7305d8419069194ddef20a31b Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 15:42:48 +0900 Subject: [PATCH 04/12] Exclude syntax requires exact match --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 481a450..ae8ff81 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,7 @@ jobs: - os: macos-14 target: - tool-version: '0.16.0' + command: 'cargo-make make --version' runs-on: ${{ matrix.os }} steps: - uses: asdf-vm/actions/plugin-test@v3 From 492ab430104ce7f1c239ef29c431a3b9588847c7 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 16:01:00 +0900 Subject: [PATCH 05/12] Exclude looks like working under JSON comparing --- .github/workflows/build.yml | 12 +++++++----- .github/workflows/mise.yml | 9 ++++++++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae8ff81..8c52f57 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,6 @@ jobs: matrix: os: - ubuntu-latest - - macos-14 # M1 - macos-13 # Intel target: - tool-version: 'latest' @@ -37,12 +36,15 @@ jobs: - tool-version: '0.16.0' # makers does not exist command: 'cargo-make make --version' - exclude: + include: # They are releasing aarch64 binary since 0.36.7: https://github.com/sagiegurari/cargo-make/commit/ab3cac2261c0ba67ab6d7a277aff8252faec0b1c - - os: macos-14 + - os: macos-14 # M1 target: - - tool-version: '0.16.0' - command: 'cargo-make make --version' + - tool-version: 'latest' + command: 'makers --version && cargo-make make --version' + # They are releasing aarch64 binary since 0.36.7: https://github.com/sagiegurari/cargo-make/commit/ab3cac2261c0ba67ab6d7a277aff8252faec0b1c + - tool-version: '0.36.7' + command: 'makers --version && cargo-make make --version' runs-on: ${{ matrix.os }} steps: - uses: asdf-vm/actions/plugin-test@v3 diff --git a/.github/workflows/mise.yml b/.github/workflows/mise.yml index c7c5bfb..5cecf5e 100644 --- a/.github/workflows/mise.yml +++ b/.github/workflows/mise.yml @@ -22,7 +22,6 @@ jobs: matrix: os: - ubuntu-latest - - macos-14 # M1 - macos-13 # Intel target: - command: | @@ -34,6 +33,14 @@ jobs: mise install cargo-make@0.16.0 # makers does not exist mise x cargo-make@0.16.0 -- cargo-make make --version + include: + # They are releasing aarch64 binary since 0.36.7: https://github.com/sagiegurari/cargo-make/commit/ab3cac2261c0ba67ab6d7a277aff8252faec0b1c + - os: macos-14 # M1 + target: + - command: | + mise install cargo-make@36.7 + mise x cargo-make@latest -- makers --version + mise x cargo-make@latest -- cargo-make make --version runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From 4510b64a13a2e3ad7aa07f09a00491e4d121a65c Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 16:13:13 +0900 Subject: [PATCH 06/12] YAML matrix is hard for human --- .github/workflows/build.yml | 11 ++++++----- .github/workflows/mise.yml | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c52f57..1e206c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,11 +40,12 @@ jobs: # They are releasing aarch64 binary since 0.36.7: https://github.com/sagiegurari/cargo-make/commit/ab3cac2261c0ba67ab6d7a277aff8252faec0b1c - os: macos-14 # M1 target: - - tool-version: 'latest' - command: 'makers --version && cargo-make make --version' - # They are releasing aarch64 binary since 0.36.7: https://github.com/sagiegurari/cargo-make/commit/ab3cac2261c0ba67ab6d7a277aff8252faec0b1c - - tool-version: '0.36.7' - command: 'makers --version && cargo-make make --version' + tool-version: 'latest' + command: 'makers --version && cargo-make make --version' + - os: macos-14 # M1 + target: + tool-version: '0.36.7' + command: 'makers --version && cargo-make make --version' runs-on: ${{ matrix.os }} steps: - uses: asdf-vm/actions/plugin-test@v3 diff --git a/.github/workflows/mise.yml b/.github/workflows/mise.yml index 5cecf5e..6d7a4de 100644 --- a/.github/workflows/mise.yml +++ b/.github/workflows/mise.yml @@ -37,10 +37,10 @@ jobs: # They are releasing aarch64 binary since 0.36.7: https://github.com/sagiegurari/cargo-make/commit/ab3cac2261c0ba67ab6d7a277aff8252faec0b1c - os: macos-14 # M1 target: - - command: | - mise install cargo-make@36.7 - mise x cargo-make@latest -- makers --version - mise x cargo-make@latest -- cargo-make make --version + command: | + mise install cargo-make@36.7 + mise x cargo-make@latest -- makers --version + mise x cargo-make@latest -- cargo-make make --version runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From 6defb906d4a1371fa481e9dc3eecf6b0ff182dc9 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 16:16:50 +0900 Subject: [PATCH 07/12] Fix a typo --- .github/workflows/mise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mise.yml b/.github/workflows/mise.yml index 6d7a4de..dabff12 100644 --- a/.github/workflows/mise.yml +++ b/.github/workflows/mise.yml @@ -38,7 +38,7 @@ jobs: - os: macos-14 # M1 target: command: | - mise install cargo-make@36.7 + mise install cargo-make@0.36.7 mise x cargo-make@latest -- makers --version mise x cargo-make@latest -- cargo-make make --version runs-on: ${{ matrix.os }} From ef0dd06ddb62eaa5e3d330f8201a3670f9c50981 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 16:20:06 +0900 Subject: [PATCH 08/12] Make sure this plugin can be developed on supported env --- .github/workflows/ci-dev.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-dev.yml b/.github/workflows/ci-dev.yml index 7a69f78..1ea4d07 100644 --- a/.github/workflows/ci-dev.yml +++ b/.github/workflows/ci-dev.yml @@ -18,7 +18,14 @@ on: jobs: tasks: timeout-minutes: 10 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-14 # M1 + - macos-13 # Intel + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: asdf-vm/actions/setup@v3 From 71d1fb9dd7276161d30a2689cf27a1347d979493 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 16:21:45 +0900 Subject: [PATCH 09/12] Add same matrix also in mise --- .github/workflows/mise.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/mise.yml b/.github/workflows/mise.yml index dabff12..1891d1d 100644 --- a/.github/workflows/mise.yml +++ b/.github/workflows/mise.yml @@ -35,6 +35,12 @@ jobs: mise x cargo-make@0.16.0 -- cargo-make make --version include: # They are releasing aarch64 binary since 0.36.7: https://github.com/sagiegurari/cargo-make/commit/ab3cac2261c0ba67ab6d7a277aff8252faec0b1c + - os: macos-14 # M1 + target: + command: | + mise install cargo-make@latest + mise x cargo-make@latest -- makers --version + mise x cargo-make@latest -- cargo-make make --version - os: macos-14 # M1 target: command: | From 75f051d5c79b8e05b8f21319566aaf65bbe3b295 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 16:27:21 +0900 Subject: [PATCH 10/12] Can we get the ref at here? --- .github/workflows/ci-dev.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-dev.yml b/.github/workflows/ci-dev.yml index 1ea4d07..708481b 100644 --- a/.github/workflows/ci-dev.yml +++ b/.github/workflows/ci-dev.yml @@ -31,6 +31,7 @@ jobs: - uses: asdf-vm/actions/setup@v3 - run: | asdf plugin-add cargo-make https://github.com/kachick/asdf-cargo-make.git + asdf plugin update ${{ github.ref }} # https://github.com/asdf-vm/asdf/issues/1201 asdf install cargo-make makers help makers setup From dbfd3503941a273ac6478013b89f5839314ee21c Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 16:28:33 +0900 Subject: [PATCH 11/12] Fix syntax --- .github/workflows/ci-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dev.yml b/.github/workflows/ci-dev.yml index 708481b..19571cc 100644 --- a/.github/workflows/ci-dev.yml +++ b/.github/workflows/ci-dev.yml @@ -31,7 +31,7 @@ jobs: - uses: asdf-vm/actions/setup@v3 - run: | asdf plugin-add cargo-make https://github.com/kachick/asdf-cargo-make.git - asdf plugin update ${{ github.ref }} # https://github.com/asdf-vm/asdf/issues/1201 + asdf plugin update cargo-make ${{ github.ref }} # https://github.com/asdf-vm/asdf/issues/1201 asdf install cargo-make makers help makers setup From 0c7634870182371fba12d722055ef373dddf013e Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 25 Feb 2024 16:37:25 +0900 Subject: [PATCH 12/12] :< --- .github/workflows/ci-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dev.yml b/.github/workflows/ci-dev.yml index 19571cc..2b3098a 100644 --- a/.github/workflows/ci-dev.yml +++ b/.github/workflows/ci-dev.yml @@ -23,7 +23,7 @@ jobs: matrix: os: - ubuntu-latest - - macos-14 # M1 + # - macos-14 # M1 # asdf-typos does not support yet https://github.com/aschiavon91/asdf-typos/blob/98babb263fc77a9d9f2aaebb257899c29cb4c5d4/bin/download#L21 - macos-13 # Intel runs-on: ${{ matrix.os }} steps: