From f7df1fc1ab1ffca2a44e47964684774dc746aafb Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 11:53:07 -0700 Subject: [PATCH 01/12] [macos] Fix latest macos --- .github/workflows/test.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dedb6e4..d9eb701 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -85,7 +85,10 @@ jobs: run: echo "The SHA check should have failed!" && exit 1 test-action-with-sha256-checksum-on-mac: - runs-on: macos-latest + strategy: + matrix: + os: [macos-12, macos-13, macos-14, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install devbox From 9e3d868293c574ca67783851c84a05ea3e6ed6fe Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 11:56:55 -0700 Subject: [PATCH 02/12] add all macos versions --- .github/workflows/test.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d9eb701..03a87ab 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,7 +22,10 @@ permissions: jobs: test-action: - runs-on: ubuntu-latest + strategy: + matrix: + os: [macos-12, macos-13, macos-14, macos-latest, ubuntu-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install devbox @@ -85,10 +88,7 @@ jobs: run: echo "The SHA check should have failed!" && exit 1 test-action-with-sha256-checksum-on-mac: - strategy: - matrix: - os: [macos-12, macos-13, macos-14, macos-latest] - runs-on: ${{ matrix.os }} + runs-on: macos-latest steps: - uses: actions/checkout@v4 - name: Install devbox From 9013e4264d2e20777882f61457626c210357fdce Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 11:58:04 -0700 Subject: [PATCH 03/12] Fix hash --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 03a87ab..2adf4d6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -97,6 +97,6 @@ jobs: devbox-version: 0.9.1 enable-cache: true refresh-cli: true - sha256-checksum: '3cf9bdffbdcc73f49f99f90df7092379589ef2e90f994cfc0163d2ff07a1f189' + sha256-checksum: 'e7793acf6dadecc6a04eb64d6352665698c75f6c9f59fbe3efee3b04dbec294d' project-path: 'testdata' disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}" From 47688657bcb36792220b06c064a726cfbc02c903 Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 12:03:29 -0700 Subject: [PATCH 04/12] Debug --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index 60b33ec..43ae25d 100644 --- a/action.yml +++ b/action.yml @@ -106,6 +106,9 @@ runs: shell: bash run: | if [ "$RUNNER_OS" == "macOS" ]; then + which tar + which gtar + which bsdtar sudo mv /usr/local/bin/gtar /usr/local/bin/gtar.orig echo "#!/bin/sh" >> /usr/local/bin/gtar echo 'exec sudo /usr/local/bin/gtar.orig "$@"' >> /usr/local/bin/gtar From bf7cbe42bc125bf10f249b2bd40c23fbda0ea131 Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 12:05:59 -0700 Subject: [PATCH 05/12] Enable cache --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2adf4d6..9766bb5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -32,6 +32,7 @@ jobs: uses: ./ with: project-path: 'testdata' + enable-cache: true disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}" test-action-with-version: From 8966169816c4c9b36e860130ffefe5e404a52f57 Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 12:26:57 -0700 Subject: [PATCH 06/12] Fix --- .github/workflows/test.yaml | 3 ++- action.yml | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9766bb5..c3ca3c7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -25,6 +25,7 @@ jobs: strategy: matrix: os: [macos-12, macos-13, macos-14, macos-latest, ubuntu-latest] + use-cache: [true, false] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -32,7 +33,7 @@ jobs: uses: ./ with: project-path: 'testdata' - enable-cache: true + enable-cache: ${{ matrix.use-cache }} disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}" test-action-with-version: diff --git a/action.yml b/action.yml index 43ae25d..8fc6947 100644 --- a/action.yml +++ b/action.yml @@ -109,10 +109,11 @@ runs: which tar which gtar which bsdtar - sudo mv /usr/local/bin/gtar /usr/local/bin/gtar.orig - echo "#!/bin/sh" >> /usr/local/bin/gtar - echo 'exec sudo /usr/local/bin/gtar.orig "$@"' >> /usr/local/bin/gtar - sudo chmod +x /usr/local/bin/gtar + tar_path=$(which tar) + # sudo mv $tar_path $tar_path.orig + echo "#!/bin/sh" >> $tar_path + echo 'exec sudo $tar_path.orig "$@"' >> $tar_path + sudo chmod +x $tar_path elif [ "$RUNNER_OS" == "Linux" ]; then mkdir -p ~/.cache mkdir -p ~/.local/bin @@ -174,7 +175,8 @@ runs: shell: bash run: | if [ "$RUNNER_OS" == "macOS" ]; then - sudo mv /usr/local/bin/gtar.orig /usr/local/bin/gtar + tar_path=$(which tar) + sudo mv $tar_path.orig $tar_path elif [ "$RUNNER_OS" == "Linux" ]; then rm ~/.local/bin/tar fi From 68e0af85d56c992da9cde648290e576af8be73a8 Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 12:28:33 -0700 Subject: [PATCH 07/12] fix --- action.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/action.yml b/action.yml index 8fc6947..61a4ee7 100644 --- a/action.yml +++ b/action.yml @@ -106,14 +106,11 @@ runs: shell: bash run: | if [ "$RUNNER_OS" == "macOS" ]; then - which tar - which gtar - which bsdtar - tar_path=$(which tar) - # sudo mv $tar_path $tar_path.orig - echo "#!/bin/sh" >> $tar_path - echo 'exec sudo $tar_path.orig "$@"' >> $tar_path - sudo chmod +x $tar_path + gtar_path=$(which gtar) + # sudo mv $gtar_path $gtar_path.orig + echo "#!/bin/sh" >> $gtar_path + echo 'exec sudo $gtar_path.orig "$@"' >> $gtar_path + sudo chmod +x $gtar_path elif [ "$RUNNER_OS" == "Linux" ]; then mkdir -p ~/.cache mkdir -p ~/.local/bin @@ -175,8 +172,8 @@ runs: shell: bash run: | if [ "$RUNNER_OS" == "macOS" ]; then - tar_path=$(which tar) - sudo mv $tar_path.orig $tar_path + gtar_path=$(which gtar) + sudo mv $gtar_path.orig $gtar_path elif [ "$RUNNER_OS" == "Linux" ]; then rm ~/.local/bin/tar fi From 4be38e600c2594150098477ac907cc712e805b64 Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 12:36:11 -0700 Subject: [PATCH 08/12] Fix --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 61a4ee7..42692b6 100644 --- a/action.yml +++ b/action.yml @@ -107,7 +107,7 @@ runs: run: | if [ "$RUNNER_OS" == "macOS" ]; then gtar_path=$(which gtar) - # sudo mv $gtar_path $gtar_path.orig + sudo mv $gtar_path $gtar_path.orig echo "#!/bin/sh" >> $gtar_path echo 'exec sudo $gtar_path.orig "$@"' >> $gtar_path sudo chmod +x $gtar_path From 7441caca3d3e3e474a6beb7f787e4446178efe42 Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 12:42:47 -0700 Subject: [PATCH 09/12] Fix --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 42692b6..1a923df 100644 --- a/action.yml +++ b/action.yml @@ -109,7 +109,7 @@ runs: gtar_path=$(which gtar) sudo mv $gtar_path $gtar_path.orig echo "#!/bin/sh" >> $gtar_path - echo 'exec sudo $gtar_path.orig "$@"' >> $gtar_path + echo "exec sudo $gtar_path.orig \"$@\"" >> $gtar_path sudo chmod +x $gtar_path elif [ "$RUNNER_OS" == "Linux" ]; then mkdir -p ~/.cache From c914f8fe87e80c3e4a8a44c9f4e5ba232b8969ff Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 13:00:42 -0700 Subject: [PATCH 10/12] debug --- .github/workflows/test.yaml | 11 ----------- action.yml | 17 +++++++++++------ 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c3ca3c7..900313f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -47,17 +47,6 @@ jobs: project-path: 'testdata' disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}" - test-action-with-cache: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install devbox - uses: ./ - with: - enable-cache: true - project-path: 'testdata' - disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}" - test-action-with-sha256-checksum: runs-on: ubuntu-latest steps: diff --git a/action.yml b/action.yml index 1a923df..f098157 100644 --- a/action.yml +++ b/action.yml @@ -106,11 +106,15 @@ runs: shell: bash run: | if [ "$RUNNER_OS" == "macOS" ]; then - gtar_path=$(which gtar) - sudo mv $gtar_path $gtar_path.orig - echo "#!/bin/sh" >> $gtar_path - echo "exec sudo $gtar_path.orig \"$@\"" >> $gtar_path - sudo chmod +x $gtar_path + # gtar_path=$(which gtar) + # sudo mv $gtar_path $gtar_path.orig + # echo "#!/bin/sh" >> $gtar_path + # echo "exec sudo $gtar_path.orig \"$@\"" >> $gtar_path + # sudo chmod +x $gtar_path + sudo mv /usr/local/bin/gtar /usr/local/bin/gtar.orig + echo "#!/bin/sh" >> /usr/local/bin/gtar + echo 'exec sudo /usr/local/bin/gtar.orig "$@"' >> /usr/local/bin/gtar + sudo chmod +x /usr/local/bin/gtar elif [ "$RUNNER_OS" == "Linux" ]; then mkdir -p ~/.cache mkdir -p ~/.local/bin @@ -173,7 +177,8 @@ runs: run: | if [ "$RUNNER_OS" == "macOS" ]; then gtar_path=$(which gtar) - sudo mv $gtar_path.orig $gtar_path + # sudo mv $gtar_path.orig $gtar_path + sudo mv /usr/local/bin/gtar.orig /usr/local/bin/gtar elif [ "$RUNNER_OS" == "Linux" ]; then rm ~/.local/bin/tar fi From 82d45f12a87f6a0c8a0aa130eb1c83bb67119955 Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 13:02:19 -0700 Subject: [PATCH 11/12] only run on macos12,13 --- .github/workflows/test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 900313f..42b65f4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,7 +24,8 @@ jobs: test-action: strategy: matrix: - os: [macos-12, macos-13, macos-14, macos-latest, ubuntu-latest] + # os: [macos-12, macos-13, macos-14, macos-latest, ubuntu-latest] + os: [macos-12, macos-13, ubuntu-latest] use-cache: [true, false] runs-on: ${{ matrix.os }} steps: From 6a1748d7dbd4fee301f27e44f08ebe13a9caac0d Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Wed, 8 May 2024 13:15:41 -0700 Subject: [PATCH 12/12] fix --- .github/workflows/test.yaml | 4 +--- action.yml | 17 ++++++----------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 42b65f4..295bff1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,8 +24,7 @@ jobs: test-action: strategy: matrix: - # os: [macos-12, macos-13, macos-14, macos-latest, ubuntu-latest] - os: [macos-12, macos-13, ubuntu-latest] + os: [macos-12, macos-13, macos-14, macos-latest, ubuntu-latest] use-cache: [true, false] runs-on: ${{ matrix.os }} steps: @@ -87,7 +86,6 @@ jobs: uses: ./ with: devbox-version: 0.9.1 - enable-cache: true refresh-cli: true sha256-checksum: 'e7793acf6dadecc6a04eb64d6352665698c75f6c9f59fbe3efee3b04dbec294d' project-path: 'testdata' diff --git a/action.yml b/action.yml index f098157..a60c433 100644 --- a/action.yml +++ b/action.yml @@ -106,15 +106,11 @@ runs: shell: bash run: | if [ "$RUNNER_OS" == "macOS" ]; then - # gtar_path=$(which gtar) - # sudo mv $gtar_path $gtar_path.orig - # echo "#!/bin/sh" >> $gtar_path - # echo "exec sudo $gtar_path.orig \"$@\"" >> $gtar_path - # sudo chmod +x $gtar_path - sudo mv /usr/local/bin/gtar /usr/local/bin/gtar.orig - echo "#!/bin/sh" >> /usr/local/bin/gtar - echo 'exec sudo /usr/local/bin/gtar.orig "$@"' >> /usr/local/bin/gtar - sudo chmod +x /usr/local/bin/gtar + gtar_path=$(which gtar) + sudo mv $gtar_path $gtar_path.orig + echo "#!/bin/sh" >> $gtar_path + echo "exec sudo $gtar_path.orig \"\$@\"" >> $gtar_path + sudo chmod +x $gtar_path elif [ "$RUNNER_OS" == "Linux" ]; then mkdir -p ~/.cache mkdir -p ~/.local/bin @@ -177,8 +173,7 @@ runs: run: | if [ "$RUNNER_OS" == "macOS" ]; then gtar_path=$(which gtar) - # sudo mv $gtar_path.orig $gtar_path - sudo mv /usr/local/bin/gtar.orig /usr/local/bin/gtar + sudo mv $gtar_path.orig $gtar_path elif [ "$RUNNER_OS" == "Linux" ]; then rm ~/.local/bin/tar fi