diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ed62b0..7eb72a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} @@ -32,19 +33,26 @@ jobs: id: latest_commit working-directory: ruby run: echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT - + - name: Set latest commit (3.4-asan) + 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 }}" 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,7 +64,7 @@ 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) @@ -116,6 +124,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' - name: Clone ruby-dev-builder uses: actions/checkout@v4 with: @@ -191,7 +206,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