Skip to content

Commit 02bbcba

Browse files
committed
Test FreeBSD and OpenBSD
1 parent 2fe74f0 commit 02bbcba

File tree

1 file changed

+63
-2
lines changed

1 file changed

+63
-2
lines changed

.github/workflows/build.yml

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
- name: Install
7171
run: rake -f -r bundler/gem_tasks install
7272

73-
spec-musl:
73+
spec-container:
7474

7575
name: spec (alpine-latest, ${{ matrix.ruby-version }})
7676

@@ -106,11 +106,72 @@ jobs:
106106
- name: Spec
107107
run: bundle exec rake spec
108108

109+
spec-vm:
110+
111+
name: spec (${{ matrix.vm }}-latest)
112+
113+
runs-on: ubuntu-latest
114+
115+
strategy:
116+
fail-fast: false
117+
matrix:
118+
include:
119+
- vm: freebsd
120+
install-dependencies: |
121+
pkg install -y node npm protobuf ruby rubygem-bundler rubygem-rake
122+
- vm: openbsd
123+
install-dependencies: |
124+
ruby=$(pkg_info -Q ruby | grep '^ruby-[0-9]' | sort -rV | head -n 1)
125+
pkg_add node protobuf $ruby
126+
pkg_info $ruby | grep 'ln -sf' | $SHELL
127+
128+
steps:
129+
- name: Checkout
130+
uses: actions/checkout@v4
131+
132+
- name: Setup vm
133+
if: matrix.vm == 'freebsd'
134+
uses: vmactions/freebsd-vm@v1
135+
136+
- name: Setup vm
137+
if: matrix.vm == 'openbsd'
138+
uses: vmactions/openbsd-vm@v1
139+
140+
- name: Setup vmshell
141+
run: |
142+
_osname=${{ matrix.vm }}
143+
tee /home/runner/.local/bin/vmshell <<EOF
144+
#!/usr/bin/env bash
145+
ssh $_osname "cd \$(printf %q "\$PWD") && exec \\\$SHELL -e"<\$1
146+
EOF
147+
chmod a+x /home/runner/.local/bin/vmshell
148+
149+
- name: Install dependencies
150+
run: ${{ matrix.install-dependencies }}
151+
shell: vmshell {0}
152+
153+
- name: Bundle
154+
run: bundle install
155+
shell: vmshell {0}
156+
157+
- name: Compile
158+
run: EMBEDDED_SASS_PROTOCOL=https://github.com/sass/sass/raw/HEAD/spec/embedded_sass.proto PROTOC_BIN=$(which protoc) bundle exec rake compile
159+
shell: vmshell {0}
160+
161+
- name: Install
162+
run: rake -f -r bundler/gem_tasks install
163+
shell: vmshell {0}
164+
165+
# TODO: https://github.com/sass/dart-sass/pull/2413
166+
# - name: Spec
167+
# run: bundle exec rake spec
168+
# shell: freebsd {0}
169+
109170
release:
110171

111172
if: github.event.repository.fork == false && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
112173

113-
needs: [lint, spec, spec-musl]
174+
needs: [lint, spec, spec-container, spec-vm]
114175

115176
runs-on: ubuntu-latest
116177

0 commit comments

Comments
 (0)