diff options
| author | Loris Cro <kappaloris@gmail.com> | 2022-11-25 20:08:57 +0100 |
|---|---|---|
| committer | Loris Cro <kappaloris@gmail.com> | 2022-11-25 20:08:57 +0100 |
| commit | bc90f2ae3cb94cb5282a88a990792dc7a97f4cc7 (patch) | |
| tree | b1e1c86450a74f7a1d7b74aed3707d1332c2102b /.github | |
| parent | 764651c8405643a539a8a1aeb654803bf978a9b2 (diff) | |
| download | zig-bc90f2ae3cb94cb5282a88a990792dc7a97f4cc7.tar.gz zig-bc90f2ae3cb94cb5282a88a990792dc7a97f4cc7.zip | |
ci: when running the workflow manually, preserve newer ci folder
This is the main way this feature is supposed to work:
1. you discover that a test started failing at some point
but a misconfiguration in the CI script didn't catch that
causing a bunch of false negative (ie false green) CIs
over time
2. you fix the script and now want to figure out when the
test started failing
3. you want to rebuild older commits, potentially only on specific
targets, but with the new fixed CI script that correctly
catches failures
This is what this commit enables
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/ci.yaml | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a14b705be5..5dec0cc11a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,7 +50,12 @@ jobs: uses: actions/checkout@v3 - name: Switch to specific commit if: ${{ github.event_name == 'workflow_dispatch' }} - run: git checkout ${{ inputs.commit }} + run: | + rf -rf ../ci + cp -r ci ../ + git checkout ${{ inputs.commit }} + rm -rf ci + mv ../ci . - name: Build and Test run: sh ./ci/linux/build-x86_64-debug.sh - name: Print Version @@ -63,7 +68,12 @@ jobs: uses: actions/checkout@v3 - name: Switch to specific commit if: ${{ github.event_name == 'workflow_dispatch' }} - run: git checkout ${{ inputs.commit }} + run: | + rf -rf ../ci + cp -r ci ../ + git checkout ${{ inputs.commit }} + rm -rf ci + mv ../ci . - name: Build and Test run: sh ./ci/linux/build-x86_64-release.sh x86_64-macos: @@ -76,7 +86,12 @@ jobs: uses: actions/checkout@v3 - name: Switch to specific commit if: ${{ github.event_name == 'workflow_dispatch' }} - run: git checkout ${{ inputs.commit }} + run: | + rf -rf ../ci + cp -r ci ../ + git checkout ${{ inputs.commit }} + rm -rf ci + mv ../ci . - name: Build and Test run: ./ci/macos/build-x86_64.sh x86_64-windows: @@ -89,7 +104,12 @@ jobs: uses: actions/checkout@v3 - name: Switch to specific commit if: ${{ github.event_name == 'workflow_dispatch' }} - run: git checkout ${{ inputs.commit }} + run: | + rf -rf ../ci + cp -r ci ../ + git checkout ${{ inputs.commit }} + rm -rf ci + mv ../ci . - name: Build and Test run: ./ci/windows/build.ps1 aarch64-linux: @@ -100,7 +120,12 @@ jobs: uses: actions/checkout@v3 - name: Switch to specific commit if: ${{ github.event_name == 'workflow_dispatch' }} - run: git checkout ${{ inputs.commit }} + run: | + rf -rf ../ci + cp -r ci ../ + git checkout ${{ inputs.commit }} + rm -rf ci + mv ../ci . - name: Build and Test run: sh ./ci/linux/build-aarch64.sh aarch64-macos: @@ -113,6 +138,11 @@ jobs: uses: actions/checkout@v3 - name: Switch to specific commit if: ${{ github.event_name == 'workflow_dispatch' }} - run: git checkout ${{ inputs.commit }} + run: | + rf -rf ../ci + cp -r ci ../ + git checkout ${{ inputs.commit }} + rm -rf ci + mv ../ci . - name: Build and Test run: ./ci/macos/build-aarch64.sh |
