-
-
Notifications
You must be signed in to change notification settings - Fork 35
90 lines (87 loc) · 2.67 KB
/
integration.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
name: Integration
on:
push:
branches:
- main
pull_request: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.repo.slug }} (ruby=${{ matrix.ruby }}, os=${{ matrix.os }})
strategy:
fail-fast: false
matrix:
repo:
- name: "oxidize-rb/oxi-test"
slug: oxi-test
ref: main
run: rake
- name: "matsadler/magnus"
slug: magnus-0.5
ref: "0.5.4"
run: cargo test
- name: "matsadler/magnus"
slug: magnus-head
ref: "05359fcd2369f014570f1e417c7c2d462625af5e"
run: cargo test
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
rust: ["stable"]
ruby: ["2.7", "3.2", "ruby-head"]
# Should re-include these after unstable-api is enabled
exclude:
- os: windows-latest
ruby: ruby-head
repo:
name: "matsadler/magnus"
slug: magnus-head
ref: "05359fcd2369f014570f1e417c7c2d462625af5e"
run: cargo test
- os: windows-latest
ruby: ruby-head
repo:
name: "matsadler/magnus"
slug: magnus-0.5
ref: "0.5.4"
run: cargo test
runs-on: ${{ matrix.os }}
steps:
- name: Log matrix
shell: bash
env:
INPUTS: ${{ toJSON(matrix) }}
run: |
echo "$INPUTS" | jq
- uses: actions/checkout@v3
with:
repository: ${{ matrix.repo.name }}
ref: ${{ matrix.repo.ref }}
path: repo
- uses: actions/checkout@v3
with:
path: rb-sys
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
id: setup
with:
cache-version: v2
ruby-version: ${{ matrix.ruby }}
rustup-toolchain: ${{ matrix.rust }}
- name: ✏️ Replace rb-sys
shell: bash
run: |
cd ./repo
mkdir -p .cargo
echo >> .cargo/config.toml
echo "[patch.crates-io]" >> .cargo/config.toml
echo "rb-sys = { path = \"../rb-sys/crates/rb-sys\" }" >> .cargo/config.toml
cargo update -p rb-sys
echo "RUBYOPT=-I${{ github.workspace }}/rb-sys/gem/lib" >> $GITHUB_ENV
ruby -e "File.write('Gemfile', File.read('Gemfile').gsub(/gem .rb_sys.*$/, 'gem \"rb_sys\", path: \"../rb-sys/gem\"'))" || true
bundle install -j3 --retry 3 || true
- name: 🧪 Run tests for ${{ matrix.repo.slug }}
shell: bash
run: |
cd ./repo
${{ matrix.repo.run }}