-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (58 loc) · 2.15 KB
/
build_jruby.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build and upload JRuby runtime
run-name: "Build and upload JRuby ${{ inputs.jruby_version }}${{ inputs.dry_run && ' (dry run)' || '' }}"
on:
workflow_dispatch:
inputs:
jruby_version:
description: "The JRuby version to build, specified as X.Y.Z (i.e. 9.4.7.0)"
type: string
required: true
dry_run:
description: "Skip deploying to S3 (e.g. for testing)"
type: boolean
default: false
required: false
permissions:
contents: read
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"
S3_BUCKET: "heroku-buildpack-ruby"
jobs:
build-and-upload:
runs-on: pub-hk-ubuntu-24.04-xlarge
strategy:
fail-fast: false
matrix:
base_image: ["heroku-20", "heroku-22", "heroku-24"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust toolchain
run: rustup update
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Cargo build
run: cargo build
- name: Output CHANGELOG
run: cargo run --bin jruby_changelog -- --version "${{inputs.jruby_version}}"
- name: Build Ruby
run: cargo run --bin jruby_build -- --version ${{inputs.jruby_version}} --base-image ${{matrix.base_image}} \
- name: Check Ruby
run: cargo run --bin jruby_check -- --version ${{inputs.jruby_version}} --base-image ${{matrix.base_image}} --arch amd64 | tee $GITHUB_STEP_SUMMARY
- name: Upload Ruby runtime archive to S3 dry run
if: (inputs.dry_run)
run: aws s3 sync ./output "s3://${S3_BUCKET}" --dryrun
- name: Upload Ruby runtime archive to S3 production
if: (!inputs.dry_run)
run: aws s3 sync ./output "s3://${S3_BUCKET}"
after-build-and-upload:
needs: build-and-upload
runs-on: pub-hk-ubuntu-24.04-xlarge
steps:
- name: Update Jruby inventory file locally
uses: peter-evans/create-pull-request@v6
with:
path: jruby_inventory.toml
title: "Add JRuby ${{inputs.jruby_version}} to inventory"