Skip to content
Open
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 @@
runs-on: ${{ needs.prepare.outputs.build-runs-on }}
steps:

- name: Checkout Actions
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
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

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Release Binaries' step
Uses Step
uses 'llvm/actions/setup-windows' with ref 'main', not a pinned commit hash
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 All @@ -240,7 +230,7 @@
cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
${{ needs.prepare.outputs.target-cmake-flags }} \
-C clang/cmake/caches/Release.cmake \
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"

- name: Build
Expand All @@ -258,17 +248,11 @@
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: |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should you also to specify shell: bash here? I noticed most if not all other run sections do

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bash is the default shell for Linux and Mac, so I don't think it's necessary. I think the other jobs have it from when we used to do Windows builds and had to explicitly select bash as the shell.

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 @@
--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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
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