Skip to content

Commit 9365337

Browse files
committed
workflows/release-binaries: Run tests on the same runner as the build
Also, ignore the test results since they almost always fail. This allows us to simplify the build process and skip uploading and downloading the build and source directories which are huge.
1 parent d01e1c1 commit 9365337

File tree

3 files changed

+22
-143
lines changed

3 files changed

+22
-143
lines changed

.github/workflows/release-binaries-save-stage/action.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/release-binaries-setup-stage/action.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/release-binaries.yml

Lines changed: 22 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,25 @@ jobs:
225225
run: |
226226
mv ../workflows-main .
227227
228-
- name: Setup Stage
228+
- name: Install Ninja
229+
uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main
230+
231+
- name: Setup Windows
232+
if: startsWith(runner.os, 'Windows')
233+
uses: llvm/actions/setup-windows@main
234+
with:
235+
arch: amd64
236+
237+
- name: Set Build Prefix
229238
id: setup-stage
230-
uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
239+
shell: bash
240+
run: |
241+
build_prefix=`pwd`
242+
if [ "${{ runner.os }}" = "Linux" ]; then
243+
sudo chown $USER:$USER /mnt/
244+
build_prefix=/mnt/
245+
fi
246+
echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT
231247
232248
- name: Configure
233249
id: build
@@ -258,17 +274,11 @@ jobs:
258274
path: |
259275
${{ needs.prepare.outputs.release-binary-filename }}
260276
261-
# Clean up some build files to reduce size of artifact.
262-
- name: Clean Up Build Directory
263-
shell: bash
277+
- name: Run Tests
278+
# These almost always fail so don't let them fail the build and prevent the uploads.
279+
continue-on-error: true
264280
run: |
265-
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname ${{ needs.prepare.outputs.release-binary-filename }} -delete
266-
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname _CPack_Packages -prune -exec rm -r {} +
267-
268-
- name: Save Stage
269-
uses: ./workflows-main/.github/workflows/release-binaries-save-stage
270-
with:
271-
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}
281+
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all
272282
273283
upload-release-binaries:
274284
name: "Upload Release Binaries"
@@ -327,31 +337,3 @@ jobs:
327337
--release ${{ needs.prepare.outputs.release-version }} \
328338
upload \
329339
--files ${{ needs.prepare.outputs.release-binary-filename }}*
330-
331-
test-release:
332-
name: "Test Release"
333-
needs:
334-
- prepare
335-
- build-release-package
336-
if: >-
337-
github.repository_owner == 'llvm'
338-
runs-on: ${{ needs.prepare.outputs.test-runs-on }}
339-
steps:
340-
- name: Checkout Actions
341-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
342-
with:
343-
ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }}
344-
sparse-checkout: |
345-
.github/workflows/
346-
sparse-checkout-cone-mode: false
347-
path: workflows
348-
- name: Setup Stage
349-
id: setup-stage
350-
uses: ./workflows/.github/workflows/release-binaries-setup-stage
351-
with:
352-
previous-artifact: build-release-package
353-
354-
- name: Run Tests
355-
shell: bash
356-
run: |
357-
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all

0 commit comments

Comments
 (0)