From fd209a316da134f0b9fa6f66c9fd41c7c61f1180 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Tue, 4 Jun 2024 16:54:21 -0700 Subject: [PATCH] update mach/nightly jobs to disambiguate package versions --- .gitea/workflows/zig-mach.yaml | 9 +++++---- .gitea/workflows/zig-nightly.yaml | 7 +++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/zig-mach.yaml b/.gitea/workflows/zig-mach.yaml index 9956fc8..f3c2341 100644 --- a/.gitea/workflows/zig-mach.yaml +++ b/.gitea/workflows/zig-mach.yaml @@ -7,8 +7,7 @@ on: branches: - 'zig-develop*' env: - ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ACTIONS_RUNTIME_URL: ${{ env.GITHUB_SERVER_URL }}/api/actions_pipeline/ + PKG_PREFIX: nominated-zig jobs: build-zig-nominated-mach-latest: runs-on: ubuntu-latest @@ -25,6 +24,8 @@ jobs: uses: https://git.lerch.org/lobo/setup-zig@v3 with: version: mach-latest + - name: Run tests + run: zig build test --verbose # Zig package manager expects everything to be inside a directory in the archive, # which it then strips out on download. So we need to shove everything inside a directory # the way GitHub/Gitea does for repo archives @@ -34,7 +35,7 @@ jobs: # should be using git archive, but we need our generated code to be part of it - name: Package source code with generated models run: | - tar -czf ${{ runner.temp }}/${{ github.sha }}-with-models.tar.gz \ + tar -czf ${{ runner.temp }}/${{ github.sha }}${{ env.PKG_PREFIX }}-with-models.tar.gz \ --format ustar \ --exclude 'zig-*' \ --transform 's,^,${{ github.sha }}/,' * @@ -58,7 +59,7 @@ jobs: - name: Publish source code with generated models run: | curl --user ${{ github.actor }}:${{ secrets.PACKAGE_PUSH }} \ - --upload-file ${{ runner.temp }}/${{ github.sha }}-with-models.tar.gz \ + --upload-file ${{ runner.temp }}/${{ github.sha }}${{ env.PKG_PREFIX }}-with-models.tar.gz \ https://git.lerch.org/api/packages/lobo/generic/aws-sdk-with-models/${{ github.sha }}/${{ github.sha }}-with-models.tar.gz - name: Build example run: ( cd example && zig build ) # Make sure example builds diff --git a/.gitea/workflows/zig-nightly.yaml b/.gitea/workflows/zig-nightly.yaml index d2d771e..753b813 100644 --- a/.gitea/workflows/zig-nightly.yaml +++ b/.gitea/workflows/zig-nightly.yaml @@ -7,8 +7,7 @@ on: branches: - 'zig-develop*' env: - ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ACTIONS_RUNTIME_URL: ${{ env.GITHUB_SERVER_URL }}/api/actions_pipeline/ + PKG_PREFIX: nightly-zig jobs: build-zig-nightly: runs-on: ubuntu-latest @@ -36,7 +35,7 @@ jobs: # should be using git archive, but we need our generated code to be part of it - name: Package source code with generated models run: | - tar -czf ${{ runner.temp }}/${{ github.sha }}-with-models.tar.gz \ + tar -czf ${{ runner.temp }}/${{ github.sha }}${{ env.PKG_PREFIX }}-with-models.tar.gz \ --format ustar \ --exclude 'zig-*' \ --transform 's,^,${{ github.sha }}/,' * @@ -60,7 +59,7 @@ jobs: - name: Publish source code with generated models run: | curl --user ${{ github.actor }}:${{ secrets.PACKAGE_PUSH }} \ - --upload-file ${{ runner.temp }}/${{ github.sha }}-with-models.tar.gz \ + --upload-file ${{ runner.temp }}/${{ github.sha }}${{ env.PKG_PREFIX }}-with-models.tar.gz \ https://git.lerch.org/api/packages/lobo/generic/aws-sdk-with-models/${{ github.sha }}/${{ github.sha }}-with-models.tar.gz - name: Build example run: ( cd example && zig build ) # Make sure example builds