From 297f86a12f9a55422b0712b0c654fea9764b51fe Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Fri, 24 Nov 2023 12:41:08 -0500 Subject: [PATCH] ci: test edge rubies only in upstream.yml --- .github/workflows/gem-install.yml | 4 ++-- .github/workflows/sqlite3-ruby.yml | 4 +--- .github/workflows/upstream.yml | 38 ++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml index b52f820a..8287dbeb 100644 --- a/.github/workflows/gem-install.yml +++ b/.github/workflows/gem-install.yml @@ -62,7 +62,7 @@ jobs: fail-fast: false matrix: sys: ["enable", "disable"] - ruby: ["2.7", "3.0", "3.1", "3.2", "head", "truffleruby-head"] + ruby: ["2.7", "3.0", "3.1", "3.2"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -82,7 +82,7 @@ jobs: fail-fast: false matrix: sys: ["enable", "disable"] - ruby: ["3.1", "3.2", "truffleruby-head"] + ruby: ["3.1", "3.2", "truffleruby"] runs-on: macos-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/sqlite3-ruby.yml b/.github/workflows/sqlite3-ruby.yml index 2c0667dd..26a0bb7c 100644 --- a/.github/workflows/sqlite3-ruby.yml +++ b/.github/workflows/sqlite3-ruby.yml @@ -28,9 +28,7 @@ jobs: ruby: ["3.2", "3.1", "3.0", "2.7"] lib: [system, packaged] include: - - { os: ubuntu-latest, ruby: truffleruby-head, lib: packaged } - - { os: ubuntu-latest, ruby: head, lib: packaged } - - { os: ubuntu-latest, ruby: head, lib: system } + - { os: ubuntu-latest, ruby: truffleruby, lib: packaged } - { os: windows-latest, ruby: ucrt, lib: system } - { os: windows-latest, ruby: mswin, lib: system } diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 68af68cd..b3387e4e 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -6,6 +6,12 @@ on: workflow_dispatch: schedule: - cron: "0 8 * * 3" # At 08:00 on Wednesday # https://crontab.guru/#0_8_*_*_3 + pull_request: + types: [opened, synchronize] + branches: + - '*' + paths: + - .github/workflows/upstream.yml # this file jobs: sqlite-head: @@ -21,3 +27,35 @@ jobs: bundler-cache: true - run: bundle exec rake compile -- --with-sqlite-source-dir=${GITHUB_WORKSPACE}/sqlite - run: bundle exec rake test + + ruby-head: + name: ${{matrix.ruby}}-${{matrix.lib}} + strategy: + fail-fast: false + matrix: + include: + - { os: ubuntu-latest, ruby: truffleruby, lib: packaged } + - { os: ubuntu-latest, ruby: head, lib: packaged } + - { os: ubuntu-latest, ruby: head, lib: system } + + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby-pkgs@v1 + with: + ruby-version: ${{matrix.ruby}} + bundler-cache: true + apt-get: libsqlite3-dev + - if: matrix.lib == 'packaged' + uses: actions/cache@v3 + with: + path: ports + key: ports-${{matrix.os}}-${{hashFiles('ext/sqlite3/extconf.rb','dependencies.yml')}} + + - run: bundle exec rake compile -- --disable-system-libraries + if: matrix.lib == 'packaged' + + - run: bundle exec rake compile -- --enable-system-libraries + if: matrix.lib == 'system' + + - run: bundle exec rake test