-
Notifications
You must be signed in to change notification settings - Fork 15
Add 3.4-asan builds, try 2 #15
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
Changes from 1 commit
22ba6cd
e5b18c9
a962839
204bbcd
ecd70d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ jobs: | |
outputs: | ||
should_build: ${{ steps.check_commit.outputs.should_build }} | ||
commit: ${{ steps.latest_commit.outputs.commit }} | ||
commit_3_4_asan: ${{ steps.latest_commit_3_4_asan.outputs.commit }} | ||
previous_release: ${{ steps.check_commit.outputs.previous_release }} | ||
build_matrix: ${{ steps.matrix.outputs.build_matrix }} | ||
reuse_matrix: ${{ steps.matrix.outputs.reuse_matrix }} | ||
|
@@ -28,23 +29,31 @@ jobs: | |
with: | ||
repository: ruby/ruby | ||
path: ruby | ||
fetch-depth: 0 | ||
- name: Set latest_commit | ||
id: latest_commit | ||
working-directory: ruby | ||
run: echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
|
||
- name: Set latest commit (3.4-asan) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if it should be named It's also "3.4 + ASAN" so 3.4-asan is kinda intuitive. |
||
id: latest_commit_3_4_asan | ||
working-directory: ruby | ||
run: | | ||
git checkout ruby_3_4 | ||
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
- name: Check if latest commit already built | ||
uses: actions/github-script@v7 | ||
id: check_commit | ||
with: | ||
script: | | ||
const latestDevCommit = "${{ steps.latest_commit.outputs.commit }}" | ||
const latest34Asan = "${{ steps.latest_commit_3_4_asan.outputs.commit }}" | ||
eregon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const { owner, repo } = context.repo | ||
let { data: release } = await github.rest.repos.getLatestRelease({ owner, repo }) | ||
const firstLine = release.body.split('\n')[0] | ||
const latestReleaseCommit = firstLine.split('@')[1] | ||
console.log(`Latest release commit: ${latestReleaseCommit}`) | ||
console.log(`Latest ruby commit: ${latestDevCommit}`) | ||
console.log(`Latest 3.4-asan: ${latest34Asan}`) | ||
core.setOutput('should_build', latestReleaseCommit !== latestDevCommit) | ||
core.setOutput('previous_release', release.tag_name) | ||
- name: Compute build and reuse matrix | ||
|
@@ -56,14 +65,14 @@ jobs: | |
const skipSlow = "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.skip_slow == 'true' }}" | ||
const buildMatrix = JSON.stringify( | ||
skipSlow === 'false' ? | ||
{ os: osList, name: ['head', 'debug'], include: [{ os: 'ubuntu-24.04', name: 'asan' }] } : | ||
{ os: osList, name: ['head', 'debug'], include: [{ os: 'ubuntu-24.04', name: 'asan' }, { os: 'ubuntu-24.04', name: '3.4-asan' }] } : | ||
{ os: osList, name: ['head'] } | ||
) | ||
core.setOutput('build_matrix', buildMatrix) | ||
const reuseMatrix = JSON.stringify( | ||
skipSlow === 'false' ? | ||
{ os: ['ubuntu-latest'], name: ['noop'] } : // GitHub doesn't like having an empty matrix, skips jobs that depend on reuse-slow | ||
{ os: osList, name: ['debug'], include: [{ os: 'ubuntu-24.04', name: 'asan' }] } | ||
{ os: osList, name: ['debug'], include: [{ os: 'ubuntu-24.04', name: 'asan' }, { os: 'ubuntu-24.04', name: '3.4-asan' }] } | ||
) | ||
core.setOutput('reuse_matrix', reuseMatrix) | ||
console.log(`build_matrix: ${buildMatrix}, reuse_matrix: ${reuseMatrix}`) | ||
|
@@ -116,6 +125,13 @@ jobs: | |
with: | ||
repository: ruby/ruby | ||
ref: ${{ needs.prepare.outputs.commit }} | ||
if: matrix.name != '3.4-asan' | ||
- name: Clone ruby (3.4-asan) | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ruby/ruby | ||
ref: ${{ needs.prepare.outputs.commit_3_4_asan }} | ||
if: matrix.name == '3.4-asan' | ||
eregon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Clone ruby-dev-builder | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -191,7 +207,7 @@ jobs: | |
# Make the test timeouts more generous too (ASAN is slower) | ||
echo "RUBY_TEST_TIMEOUT_SCALE=5" >> $GITHUB_ENV | ||
echo "SYNTAX_SUGGEST_TIMEOUT=600" >> $GITHUB_ENV | ||
if: matrix.name == 'asan' | ||
if: matrix.name == 'asan' || matrix.name == '3.4-asan' | ||
|
||
# Build | ||
- run: mkdir -p ~/.rubies | ||
|
Uh oh!
There was an error while loading. Please reload this page.