Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/workflows/release-binaries-save-stage/action.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/release-binaries-setup-stage/action.yml

This file was deleted.

86 changes: 21 additions & 65 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,40 +194,30 @@ jobs:
runs-on: ${{ needs.prepare.outputs.build-runs-on }}
steps:

- name: Checkout Actions
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }}
sparse-checkout: |
.github/workflows/
sparse-checkout-cone-mode: false
# Check out outside of working directory so the source checkout doesn't
# remove it.
path: workflows

# actions/checkout does not support paths outside of the GITHUB_WORKSPACE.
# Also, anything that we put inside of GITHUB_WORKSPACE will be overwritten
# by future actions/checkout steps. Therefore, in order to checkout the
# latest actions from main, we need to first checkout out the actions inside of
# GITHUB_WORKSPACE (see previous step), then use actions/checkout to checkout
# the code being built and the move the actions from main back into GITHUB_WORKSPACE,
# becasue the uses on composite actions only reads workflows from inside GITHUB_WORKSPACE.
- shell: bash
run: mv workflows ../workflows-main

- name: Checkout LLVM
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ needs.prepare.outputs.ref }}

- name: Copy main workflows
shell: bash
run: |
mv ../workflows-main .
- name: Install Ninja
uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main

- name: Setup Windows
if: startsWith(runner.os, 'Windows')
uses: llvm/actions/setup-windows@main
with:
arch: amd64

- name: Setup Stage
- name: Set Build Prefix
id: setup-stage
uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
shell: bash
run: |
build_prefix=`pwd`
if [ "${{ runner.os }}" = "Linux" ]; then
sudo chown $USER:$USER /mnt/
build_prefix=/mnt/
fi
echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT

- name: Configure
id: build
Expand Down Expand Up @@ -258,17 +248,11 @@ jobs:
path: |
${{ needs.prepare.outputs.release-binary-filename }}

# Clean up some build files to reduce size of artifact.
- name: Clean Up Build Directory
shell: bash
- name: Run Tests
# These almost always fail so don't let them fail the build and prevent the uploads.
continue-on-error: true
run: |
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname ${{ needs.prepare.outputs.release-binary-filename }} -delete
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname _CPack_Packages -prune -exec rm -r {} +

- name: Save Stage
uses: ./workflows-main/.github/workflows/release-binaries-save-stage
with:
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all

upload-release-binaries:
name: "Upload Release Binaries"
Expand Down Expand Up @@ -327,31 +311,3 @@ jobs:
--release ${{ needs.prepare.outputs.release-version }} \
upload \
--files ${{ needs.prepare.outputs.release-binary-filename }}*

test-release:
name: "Test Release"
needs:
- prepare
- build-release-package
if: >-
github.repository_owner == 'llvm'
runs-on: ${{ needs.prepare.outputs.test-runs-on }}
steps:
- name: Checkout Actions
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }}
sparse-checkout: |
.github/workflows/
sparse-checkout-cone-mode: false
path: workflows
- name: Setup Stage
id: setup-stage
uses: ./workflows/.github/workflows/release-binaries-setup-stage
with:
previous-artifact: build-release-package

- name: Run Tests
shell: bash
run: |
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all
Loading