|
| 1 | +name: Test build compatibility of Jekyll theme gems |
| 2 | + |
| 3 | +on: |
| 4 | + # Runs on pushes targeting the default branch |
| 5 | + push: |
| 6 | + branches: ["main"] |
| 7 | + |
| 8 | + # Allows you to run this workflow manually from the Actions tab |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | +jobs: |
| 12 | + gem_build: |
| 13 | + name: "Gem build (Ruby ${{ matrix.ruby }} on ${{ matrix.os }})" |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#choosing-github-hosted-runners |
| 18 | + os: [ubuntu-latest, ubuntu-24.04-arm, macos-13, macos-latest, windows-latest] |
| 19 | + # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' |
| 20 | + ruby: ['2.7', '3.1', '3.2', '3.3', '3.4'] |
| 21 | + runs-on: ${{ matrix.os }} |
| 22 | + steps: |
| 23 | + - name: Checkout |
| 24 | + uses: actions/checkout@v4 |
| 25 | + with: |
| 26 | + fetch-depth: 1 |
| 27 | + - name: "Setup Ruby ${{ matrix.ruby }} on ${{ matrix.os }}" |
| 28 | + uses: ruby/setup-ruby@v1 |
| 29 | + with: |
| 30 | + ruby-version: ${{ matrix.ruby }} |
| 31 | + rubygems: latest |
| 32 | + bundler-cache: true # runs 'bundle install' and caches installed gems automatically |
| 33 | + - name: Build Jekyll |
| 34 | + run: bundle exec jekyll build |
| 35 | + env: |
| 36 | + JEKYLL_ENV: production |
| 37 | + - name: Build gem |
| 38 | + run: bundle exec gem build *.gemspec |
| 39 | + |
| 40 | + gem_build_jruby: |
| 41 | + name: "Gem build (JRuby on ${{ matrix.os }})" |
| 42 | + strategy: |
| 43 | + fail-fast: false |
| 44 | + matrix: |
| 45 | + # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#choosing-github-hosted-runners |
| 46 | + os: [ubuntu-latest, ubuntu-24.04-arm, macos-13, macos-latest, windows-latest] |
| 47 | + runs-on: ${{ matrix.os }} |
| 48 | + steps: |
| 49 | + - name: Checkout |
| 50 | + uses: actions/checkout@v4 |
| 51 | + with: |
| 52 | + fetch-depth: 1 |
| 53 | + - name: "Setup JRuby on ${{ matrix.os }}" |
| 54 | + uses: ruby/setup-ruby@v1 |
| 55 | + with: |
| 56 | + ruby-version: jruby |
| 57 | + bundler-cache: true # runs 'bundle install' and caches installed gems automatically |
| 58 | + - name: Build Jekyll |
| 59 | + run: bundle exec jekyll build |
| 60 | + env: |
| 61 | + JEKYLL_ENV: production |
| 62 | + - name: Build gem |
| 63 | + run: bundle exec gem build *.gemspec |
| 64 | + |
| 65 | + gem_build_windows_11_arm: |
| 66 | + name: "Gem build (Ruby ${{ matrix.ruby }} on windows-11-arm)" |
| 67 | + strategy: |
| 68 | + fail-fast: false |
| 69 | + matrix: |
| 70 | + # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' |
| 71 | + ruby: ['3.4'] |
| 72 | + # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#choosing-github-hosted-runners |
| 73 | + runs-on: windows-11-arm |
| 74 | + steps: |
| 75 | + - name: Checkout |
| 76 | + uses: actions/checkout@v4 |
| 77 | + with: |
| 78 | + fetch-depth: 1 |
| 79 | + - name: "Setup Ruby ${{ matrix.ruby }} on windows-11-arm" |
| 80 | + uses: ruby/setup-ruby@v1 |
| 81 | + with: |
| 82 | + ruby-version: ${{ matrix.ruby }} |
| 83 | + rubygems: latest |
| 84 | + bundler-cache: true # runs 'bundle install' and caches installed gems automatically |
| 85 | + - name: Build Jekyll |
| 86 | + run: bundle exec jekyll build |
| 87 | + env: |
| 88 | + JEKYLL_ENV: production |
| 89 | + - name: Build gem |
| 90 | + run: bundle exec gem build *.gemspec |
0 commit comments