From 08d2c08cb7c14e2942f1a7d921688e11c76dcc2f Mon Sep 17 00:00:00 2001 From: Michael Dewberry Date: Thu, 11 Jan 2024 00:25:59 -0500 Subject: [PATCH 1/7] Fetch submodule tags in build process --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 9b308f6..9d9fbbc 100644 --- a/Makefile +++ b/Makefile @@ -59,6 +59,7 @@ $(ragel): firmware-build: export PATH := $(PWD)/dep/bin:$(PATH) firmware-build: export RACK_DIR := $(realpath $(RACK_DIR)) firmware-build: firmware/*.mk firmware/**/*.c firmware/**/*.h firmware/**/**/*.rl + git submodule foreach 'git fetch --tags' cd firmware && $(MAKE) -f whitewhale.mk TARGET_NAME=whitewhale cd firmware && $(MAKE) -f whitewhale.mk TARGET_NAME=whitewhale-kria cd firmware && $(MAKE) -f meadowphysics.mk From ef22d885c31137e776cc91c06eafa0cbe756405d Mon Sep 17 00:00:00 2001 From: Michael Dewberry Date: Thu, 11 Jan 2024 00:36:06 -0500 Subject: [PATCH 2/7] Actions should use runner user, not root --- .github/workflows/build-plugin.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-plugin.yaml b/.github/workflows/build-plugin.yaml index 513edb8..d861c7d 100644 --- a/.github/workflows/build-plugin.yaml +++ b/.github/workflows/build-plugin.yaml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest container: image: ghcr.io/qno/rack-plugin-toolchain-win-linux - options: --user root + options: --user 1001 strategy: matrix: platform: [win-x64, lin-x64] From d9377fd00f56de0ea098ce28730ae9a96e799748 Mon Sep 17 00:00:00 2001 From: Michael Dewberry Date: Thu, 11 Jan 2024 00:45:26 -0500 Subject: [PATCH 3/7] Use root after all, but mark submodule folders as safe --- .github/workflows/build-plugin.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-plugin.yaml b/.github/workflows/build-plugin.yaml index d861c7d..55a864b 100644 --- a/.github/workflows/build-plugin.yaml +++ b/.github/workflows/build-plugin.yaml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest container: image: ghcr.io/qno/rack-plugin-toolchain-win-linux - options: --user 1001 + options: --user root strategy: matrix: platform: [win-x64, lin-x64] @@ -50,6 +50,9 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive + - name: make submodule folders safe for git operations + run: | + git submodule foreach 'git config --global --add safe.directory $(pwd)' - uses: actions/cache@v3 id: plugin-version-cache with: From 37925ea13ecf0ea38b8ab72f00054aee5b890443 Mon Sep 17 00:00:00 2001 From: Michael Dewberry Date: Thu, 11 Jan 2024 00:49:23 -0500 Subject: [PATCH 4/7] Use checkout@v4 --- .github/workflows/build-plugin.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-plugin.yaml b/.github/workflows/build-plugin.yaml index 55a864b..4ff822a 100644 --- a/.github/workflows/build-plugin.yaml +++ b/.github/workflows/build-plugin.yaml @@ -23,7 +23,7 @@ jobs: name: Modify plugin version runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/cache@v3 id: plugin-version-cache with: @@ -47,7 +47,7 @@ jobs: matrix: platform: [win-x64, lin-x64] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: make submodule folders safe for git operations @@ -81,7 +81,7 @@ jobs: matrix: platform: [x64, arm64] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - uses: actions/cache@v3 @@ -118,7 +118,7 @@ jobs: contents: write needs: [build, build-mac] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: FranzDiebold/github-env-vars-action@v2 - name: Check if plugin version matches tag run: | From 986585ef9938c876a5dc05f4b15c8344bdee0eb0 Mon Sep 17 00:00:00 2001 From: Michael Dewberry Date: Thu, 11 Jan 2024 00:53:43 -0500 Subject: [PATCH 5/7] mark working dir safe before checking out --- .github/workflows/build-plugin.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-plugin.yaml b/.github/workflows/build-plugin.yaml index 4ff822a..b96d356 100644 --- a/.github/workflows/build-plugin.yaml +++ b/.github/workflows/build-plugin.yaml @@ -47,6 +47,9 @@ jobs: matrix: platform: [win-x64, lin-x64] steps: + - name: make folder safe for git operations + run: | + git config --global --add safe.directory $(pwd) - uses: actions/checkout@v4 with: submodules: recursive From a22bef4a5b07d4854ded47c4b1784636ca84ceec Mon Sep 17 00:00:00 2001 From: Michael Dewberry Date: Thu, 11 Jan 2024 01:31:21 -0500 Subject: [PATCH 6/7] Avoid sparse checkout, so we have tag histories --- .github/workflows/build-plugin.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-plugin.yaml b/.github/workflows/build-plugin.yaml index b96d356..8e48008 100644 --- a/.github/workflows/build-plugin.yaml +++ b/.github/workflows/build-plugin.yaml @@ -53,9 +53,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - name: make submodule folders safe for git operations - run: | - git submodule foreach 'git config --global --add safe.directory $(pwd)' + fetch-depth: 0 - uses: actions/cache@v3 id: plugin-version-cache with: From 710f3e48e437bd5657ceaf4cd16123027ad06ec7 Mon Sep 17 00:00:00 2001 From: Michael Dewberry Date: Thu, 11 Jan 2024 01:39:42 -0500 Subject: [PATCH 7/7] Revert everything except checkout depth and version change --- .github/workflows/build-plugin.yaml | 4 +--- Makefile | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build-plugin.yaml b/.github/workflows/build-plugin.yaml index 8e48008..e6c6392 100644 --- a/.github/workflows/build-plugin.yaml +++ b/.github/workflows/build-plugin.yaml @@ -47,9 +47,6 @@ jobs: matrix: platform: [win-x64, lin-x64] steps: - - name: make folder safe for git operations - run: | - git config --global --add safe.directory $(pwd) - uses: actions/checkout@v4 with: submodules: recursive @@ -85,6 +82,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - uses: actions/cache@v3 id: plugin-version-cache with: diff --git a/Makefile b/Makefile index 9d9fbbc..9b308f6 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,6 @@ $(ragel): firmware-build: export PATH := $(PWD)/dep/bin:$(PATH) firmware-build: export RACK_DIR := $(realpath $(RACK_DIR)) firmware-build: firmware/*.mk firmware/**/*.c firmware/**/*.h firmware/**/**/*.rl - git submodule foreach 'git fetch --tags' cd firmware && $(MAKE) -f whitewhale.mk TARGET_NAME=whitewhale cd firmware && $(MAKE) -f whitewhale.mk TARGET_NAME=whitewhale-kria cd firmware && $(MAKE) -f meadowphysics.mk