authorgravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2022-11-25 20:08:57+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-01-09 14:42:06-07:00
logdac5189f319345c1adc710eb9b96449e6d0e71a7
tree91e1bc1ad998d8dae538c1783e86dfd51d9e97fc
parentb97fb48a6f59bf051c319f5abf326394ae7f8a30

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

1 files changed, 36 insertions(+), 6 deletions(-)

.github/workflows/ci.yaml+36-6
...@@ -50,7 +50,12 @@ jobs:...@@ -50,7 +50,12 @@ jobs:
50 uses: actions/checkout@v350 uses: actions/checkout@v3
51 - name: Switch to specific commit51 - name: Switch to specific commit
52 if: ${{ github.event_name == 'workflow_dispatch' }}52 if: ${{ github.event_name == 'workflow_dispatch' }}
53 run: git checkout ${{ inputs.commit }}53 run: |
54 rf -rf ../ci
55 cp -r ci ../
56 git checkout ${{ inputs.commit }}
57 rm -rf ci
58 mv ../ci .
54 - name: Build and Test59 - name: Build and Test
55 run: sh ./ci/linux/build-x86_64-debug.sh60 run: sh ./ci/linux/build-x86_64-debug.sh
56 - name: Print Version61 - name: Print Version
...@@ -63,7 +68,12 @@ jobs:...@@ -63,7 +68,12 @@ jobs:
63 uses: actions/checkout@v368 uses: actions/checkout@v3
64 - name: Switch to specific commit69 - name: Switch to specific commit
65 if: ${{ github.event_name == 'workflow_dispatch' }}70 if: ${{ github.event_name == 'workflow_dispatch' }}
66 run: git checkout ${{ inputs.commit }}71 run: |
72 rf -rf ../ci
73 cp -r ci ../
74 git checkout ${{ inputs.commit }}
75 rm -rf ci
76 mv ../ci .
67 - name: Build and Test77 - name: Build and Test
68 run: sh ./ci/linux/build-x86_64-release.sh78 run: sh ./ci/linux/build-x86_64-release.sh
69 x86_64-macos:79 x86_64-macos:
...@@ -76,7 +86,12 @@ jobs:...@@ -76,7 +86,12 @@ jobs:
76 uses: actions/checkout@v386 uses: actions/checkout@v3
77 - name: Switch to specific commit87 - name: Switch to specific commit
78 if: ${{ github.event_name == 'workflow_dispatch' }}88 if: ${{ github.event_name == 'workflow_dispatch' }}
79 run: git checkout ${{ inputs.commit }}89 run: |
90 rf -rf ../ci
91 cp -r ci ../
92 git checkout ${{ inputs.commit }}
93 rm -rf ci
94 mv ../ci .
80 - name: Build and Test95 - name: Build and Test
81 run: ./ci/macos/build-x86_64.sh96 run: ./ci/macos/build-x86_64.sh
82 x86_64-windows:97 x86_64-windows:
...@@ -89,7 +104,12 @@ jobs:...@@ -89,7 +104,12 @@ jobs:
89 uses: actions/checkout@v3104 uses: actions/checkout@v3
90 - name: Switch to specific commit105 - name: Switch to specific commit
91 if: ${{ github.event_name == 'workflow_dispatch' }}106 if: ${{ github.event_name == 'workflow_dispatch' }}
92 run: git checkout ${{ inputs.commit }}107 run: |
108 rf -rf ../ci
109 cp -r ci ../
110 git checkout ${{ inputs.commit }}
111 rm -rf ci
112 mv ../ci .
93 - name: Build and Test113 - name: Build and Test
94 run: ./ci/windows/build.ps1114 run: ./ci/windows/build.ps1
95 aarch64-linux:115 aarch64-linux:
...@@ -100,7 +120,12 @@ jobs:...@@ -100,7 +120,12 @@ jobs:
100 uses: actions/checkout@v3120 uses: actions/checkout@v3
101 - name: Switch to specific commit121 - name: Switch to specific commit
102 if: ${{ github.event_name == 'workflow_dispatch' }}122 if: ${{ github.event_name == 'workflow_dispatch' }}
103 run: git checkout ${{ inputs.commit }}123 run: |
124 rf -rf ../ci
125 cp -r ci ../
126 git checkout ${{ inputs.commit }}
127 rm -rf ci
128 mv ../ci .
104 - name: Build and Test129 - name: Build and Test
105 run: sh ./ci/linux/build-aarch64.sh130 run: sh ./ci/linux/build-aarch64.sh
106 aarch64-macos:131 aarch64-macos:
...@@ -113,6 +138,11 @@ jobs:...@@ -113,6 +138,11 @@ jobs:
113 uses: actions/checkout@v3138 uses: actions/checkout@v3
114 - name: Switch to specific commit139 - name: Switch to specific commit
115 if: ${{ github.event_name == 'workflow_dispatch' }}140 if: ${{ github.event_name == 'workflow_dispatch' }}
116 run: git checkout ${{ inputs.commit }}141 run: |
142 rf -rf ../ci
143 cp -r ci ../
144 git checkout ${{ inputs.commit }}
145 rm -rf ci
146 mv ../ci .
117 - name: Build and Test147 - name: Build and Test
118 run: ./ci/macos/build-aarch64.sh148 run: ./ci/macos/build-aarch64.sh