diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index c8c2d83..b128bdb 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -17,6 +17,12 @@ concurrency: group: build-${{ github.ref }} cancel-in-progress: true +# We deliberately avoid actions/cache@v4 and actions/upload-artifact@v4 in this +# workflow. They are Node.js-based and the runner image (golang:*) has no Node. +# Installing Node would add ~10s per job for every run; for now we accept +# that go module downloads happen on each invocation (~20-30s once warm). +# Real release artifacts are produced by release.yml via curl + Forgejo API. + jobs: test: runs-on: go @@ -26,14 +32,6 @@ jobs: git clone --no-checkout "https://forgejo-runner:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src git -C /tmp/src checkout "$GITHUB_SHA" cp -a /tmp/src/. . - - name: Cache Go modules - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go- - name: Vet run: go vet ./... - name: Test with race @@ -42,6 +40,7 @@ jobs: run: | mkdir -p bin go build -trimpath -ldflags="-s -w" -o bin/drover ./cmd/drover + ./bin/drover --version build-windows: runs-on: go @@ -52,14 +51,6 @@ jobs: git clone --no-checkout "https://forgejo-runner:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src git -C /tmp/src checkout "$GITHUB_SHA" cp -a /tmp/src/. . - - name: Cache Go modules - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go- - name: Cross-compile drover.exe (windows/amd64) env: GOOS: windows @@ -75,9 +66,4 @@ jobs: -X main.BuildDate=${BUILD_DATE}" \ -o bin/drover.exe ./cmd/drover ls -la bin/ - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: drover-windows-amd64-${{ github.sha }} - path: bin/drover.exe - retention-days: 14 + sha256sum bin/drover.exe