-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (77 loc) · 3.14 KB
/
Copy pathci.yml
File metadata and controls
87 lines (77 loc) · 3.14 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
# Validate the onboarding flow (spinelgems#9) on every platform we expect
# users on. We deliberately DON'T ship prebuilt Spinel binaries — the engine
# is pre-release and moving fast (no stable tags), so `install-engine` builds
# from source. This matrix's job is to prove that build-from-source path works
# on x64 + arm64 / Linux + macOS, catching the x86-vs-arm footguns before
# users do. Flip to a prebuilt-artifact model only once Spinel cuts releases.
onboard:
name: install-engine + smoke (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-14, macos-13]
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
# ubuntu/macos runners already ship git + make + cc; nothing to install.
- name: Build + install the gem (as a user would get it)
run: |
gem build bundler-spinel.gemspec
gem install ./bundler-spinel-*.gem
- name: Provision the Spinel compiler from source
run: spinel-compat install-engine # clones matz/spinel, make deps && make all, caches + smokes
- name: Engine resolves zero-config
run: spinel-compat engine
- name: Independent compile + run with the provisioned engine
run: |
echo 'puts(21 + 21)' > smoke.rb
"$HOME/.cache/spinel/current/spinel" smoke.rb -o smoke.bin
test "$(./smoke.bin)" = "42"
- name: init scaffolds a project
run: |
spinel-compat init scaffold_test
test -f scaffold_test/Gemfile
test -x scaffold_test/bin/build
# Regression coverage for the vendorer's spinel-ext.json C-ext wiring
# (spinelgems#15): per-.c compile + placeholder substitution + pkg_config
# sibling fold (tep's shape), the build-unit branch + {dir}/{dir:NAME} link
# expansion + prebuilt-override escape hatch (#14, toy's shape), the
# zero-substitution drift warning, and disabled_cflags. Framework-free,
# hermetic (cc/make/pkg-config zlib — never the sibling projects' trees).
vendorer-ext:
name: vendorer C-ext wiring (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14]
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: pkg-config + zlib headers (the test's hermetic pkg_config fixture)
run: |
if [ "$RUNNER_OS" = "Linux" ]; then
sudo apt-get update && sudo apt-get install -y pkg-config zlib1g-dev
else
brew list pkg-config >/dev/null 2>&1 || brew install pkg-config
fi
- name: wire_extensions regression suite
run: ruby test/vendorer_ext_test.rb
- name: why-report classifier suite (spinelgems#12)
run: ruby test/why_test.rb
- name: transitive gem->gem vendoring suite (spinelgems#19)
run: ruby test/transitive_vendor_test.rb