Skip to content

Precommit release #973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 68 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
3093657
[workflows] Port buildkite Windows config to GitHub actions
tstellar Feb 16, 2024
673c078
Workflow improvements:
tstellar Feb 17, 2024
9e9aee1
Automatically continue the CI job when it times out
tstellar Apr 29, 2024
a7ff883
Re-write continue-timeout-job to be more generic
tstellar May 3, 2024
3ff27a4
UPdate continue time-out-job
tstellar May 7, 2024
0406329
Make ci work on all platforms
tstellar May 7, 2024
97bde01
DEBUG Add a file so that the CI triggers
tstellar Apr 27, 2024
dd4e153
XXX: Add cI-tsts
tstellar May 7, 2024
a99fae8
XXX: disable windows tests
tstellar May 7, 2024
d515083
Fixes
tstellar May 7, 2024
857b97c
FXX
tstellar May 7, 2024
bad285c
Fix
tstellar May 7, 2024
486a771
Fix
tstellar May 7, 2024
f0ecc4b
Fix
tstellar May 7, 2024
ba5c9c3
XXX
tstellar May 7, 2024
7752d58
XXX: fix
tstellar May 7, 2024
a913c91
XXX: fix
tstellar May 7, 2024
98971b9
XXX: fix
tstellar May 7, 2024
27c3bfc
XXX:
tstellar May 7, 2024
a2c09a8
XXX:
tstellar May 7, 2024
ac5203d
Install ninja
tstellar May 7, 2024
2a5542f
XXX fix
tstellar May 7, 2024
6356bcb
XXX:
tstellar May 7, 2024
3551d83
XXX: fix timeout
tstellar May 7, 2024
6cdb82b
XXX
tstellar May 7, 2024
2cb707c
Fix continue timeout
tstellar May 7, 2024
0aa9e5c
Fix job name for timeouts
tstellar May 7, 2024
6771a8e
Fix timeout job
tstellar May 7, 2024
fb45efe
XXX: Fix
tstellar May 7, 2024
1eef1c7
Fix continue job
tstellar May 7, 2024
2e19de8
Fix timeout
tstellar May 7, 2024
5e5cea3
Fix restart
tstellar May 8, 2024
e1595ef
Update matrix
tstellar May 8, 2024
c50c8f9
Update matrix
tstellar May 8, 2024
dfb9e3b
Update matrix
tstellar May 8, 2024
448bfe7
Fix matrix
tstellar May 8, 2024
8a17f3a
Fixed
tstellar May 8, 2024
8ef7b6e
Fix job_id
tstellar May 8, 2024
36b082a
Fix sccache upload
tstellar May 8, 2024
c1e2cf6
Simplify-timeout
tstellar May 8, 2024
c39e786
Update continue-timeout job
tstellar May 8, 2024
e4310b5
Updates
tstellar May 8, 2024
17d2f41
Updates
tstellar May 8, 2024
5eb256d
Add missing files
tstellar May 8, 2024
372d11f
XX: Fix
tstellar May 8, 2024
074961a
Fix timeout id
tstellar May 8, 2024
c982084
Fixes/debug
tstellar May 8, 2024
b95e966
Fix date compare
tstellar May 8, 2024
d879fb4
Fix timeout detection
tstellar May 8, 2024
11885d2
Fix artifact name
tstellar May 8, 2024
600bf47
Fix typo
tstellar May 8, 2024
7052a03
Fix continue
tstellar May 8, 2024
9e349ca
XXX: test fail
tstellar May 8, 2024
398beb8
continue tmeout debug
tstellar May 8, 2024
7a24e50
Revert "XXX: test fail"
tstellar May 8, 2024
3934d79
timeout minutes
tstellar May 8, 2024
ba9641f
Fix pr-sccache for mac
tstellar May 8, 2024
784fc3f
timeout 1
tstellar May 8, 2024
024db66
XXX: fix
tstellar May 8, 2024
84d7617
Fix pr-sccache-save
tstellar May 8, 2024
f3a4414
Fix pr-sccache-save
tstellar May 8, 2024
3779e37
Fix sccache download
tstellar May 9, 2024
f67668a
Fix typo
tstellar May 9, 2024
79bc911
Fix typo
tstellar May 9, 2024
a3bbacc
Fix typo
tstellar May 9, 2024
c1bb3e2
Fix typo
tstellar May 9, 2024
b452883
Fix typo
tstellar May 9, 2024
b0883ec
Fix typo
tstellar May 9, 2024
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
157 changes: 157 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: "CI Tests"

permissions:
contents: read
actions: write

on:
pull_request:
types:
- opened
- synchronize
- reopened
# When a PR is closed, we still start this workflow, but then skip
# all the jobs, which makes it effectively a no-op. The reason to
# do this is that it allows us to take advantage of concurrency groups
# to cancel in progress CI jobs whenever the PR is closed.
- closed
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: True

jobs:
compute-test-configs:
name: "Compute Configurations to Test"
if: github.event.action != 'closed'
runs-on: ubuntu-22.04
outputs:
projects: ${{ steps.vars.outputs.projects }}
check-targets: ${{ steps.vars.outputs.check-targets }}
test-build: ${{ steps.vars.outputs.check-targets != '' }}
test-platforms: ${{ steps.platforms.outputs.result }}
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Compute projects to test
id: vars
uses: ./.github/workflows/compute-projects-to-test

- name: Compute platforms to test
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
id: platforms
with:
script: |
linuxConfig = {
name: "linux-x86_64",
runs_on: "ubuntu-22.04"
}
windowsConfig = {
name: "windows-x86_64",
runs_on: "windows-2022"
}
macConfig = {
name: "macos-x86_64",
runs_on: "macos-13"
}
macArmConfig = {
name: "macos-aarch64",
runs_on: "macos-14"
}

configs = [
linuxConfig,
windowsConfig,
macConfig,
macArmConfig
]
const base_ref = process.env.GITHUB_BASE_REF;
if (base_ref.startsWith('release/')) {
// This is a pull request against a release branch.
}

return configs;

ci-build-test:
# If this job name is changed, then we need to update the job-name
# paramater for the timeout-save step below.
name: "Build"
needs:
- compute-test-configs
permissions:
actions: write #pr-sccache-save may delete artifacts.
runs-on: ${{ matrix.runs_on }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.compute-test-configs.outputs.test-platforms) }}
if: needs.compute-test-configs.outputs.test-build == 'true'
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4

- name: Timeout Restore
id: timeout
uses: ./.github/workflows/timeout-restore
with:
artifact-name-suffix: ${{ matrix.name }}

- name: Setup Windows
uses: llvm/actions/setup-windows@main
if: ${{ runner.os == 'Windows' }}
with:
arch: amd64

- name: Install Ninja
uses: llvm/actions/install-ninja@main

- name: Setup sccache
uses: hendrikmuhs/ccache-action@v1
with:
max-size: 2G
variant: sccache
key: ci-${{ matrix.name }}

- name: Restore sccache from previous PR run
uses: ./.github/workflows/pr-sccache-restore
with:
artifact-name-suffix: ${{ matrix.name }}

- name: Configure
if: ${{ steps.timeout.outputs.exists != 'true' }}
shell: bash
run: |
cmake -B build -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="${{ needs.compute-test-configs.outputs.projects }}" \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_LIT_ARGS="-v --no-progress-bar" \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-S llvm

- name: Build
shell: bash
timeout-minutes: 1
run: |
ninja -C build -k 0 ${{ needs.compute-test-configs.outputs.check-targets }}

- name: Timeout Save
if: always()
uses: ./.github/workflows/timeout-save
with:
job-name: "Build (${{ matrix.name }}, ${{ matrix.runs_on }})"
artifact-name-suffix: ${{ matrix.name }}
timeout-step: "Build"
timeout-minutes: 1

- name: Save sccache for next PR run
if: always()
uses: ./.github/workflows/pr-sccache-save
with:
artifact-name-suffix: ${{ matrix.name }}
21 changes: 21 additions & 0 deletions .github/workflows/compute-projects-to-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Compute Projects To Test'
inputs:
projects:
required: false
type: 'string'

outputs:
check-targets:
description: "A space delimited list of check-targets to pass to ninja."
value: ${{ steps.compute-projects.outputs.check-targets }}

projects:
description: "A semi-colon delimited list of projects to pass to -DLLVM_ENABLE_PROJECTS."
value: ${{ steps.compute-projects.outputs.projects }}

runs:
using: "composite"
steps:
- id: compute-projects
run: .github/workflows/compute-projects-to-test/compute-projects-to-test.sh ${{ inputs.projects }}
shell: bash
Loading
Loading