From 4b0e5cc4c65479ebf2a8f88dc09458b7c874d57b Mon Sep 17 00:00:00 2001 From: Matt Schwager Date: Mon, 12 Feb 2024 13:26:54 -0700 Subject: [PATCH] Add Ruby build CI for each supported version --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++ .github/workflows/{ci.yml => test.yml} | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml rename .github/workflows/{ci.yml => test.yml} (98%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..31b9e2b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build + +on: + pull_request: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + # https://www.ruby-lang.org/en/downloads/branches/ + ruby-version: + - "3.0" + - "3.1" + - "3.2" + - "3.3" + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + - run: sudo apt update && sudo apt install -y ruby-dev + - run: gem build + - run: gem install --verbose ruzzy-*.gem + env: + RUZZY_DEBUG: "1" + MAKE: "make --environment-overrides V=1" + CC: "clang" + CXX: "clang++" + LDSHARED: "clang -shared" + LDSHAREDXX: "clang++ -shared" diff --git a/.github/workflows/ci.yml b/.github/workflows/test.yml similarity index 98% rename from .github/workflows/ci.yml rename to .github/workflows/test.yml index e2ed77b..96ce07e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: CI +name: Test on: pull_request: