|
70 | 70 | - name: Install |
71 | 71 | run: rake -f -r bundler/gem_tasks install |
72 | 72 |
|
73 | | - spec-container: |
| 73 | + spec-musl: |
74 | 74 |
|
75 | 75 | name: spec (alpine-latest, ${{ matrix.ruby-version }}) |
76 | 76 |
|
@@ -106,7 +106,43 @@ jobs: |
106 | 106 | - name: Spec |
107 | 107 | run: bundle exec rake spec |
108 | 108 |
|
109 | | - spec-vm: |
| 109 | + spec-nix: |
| 110 | + |
| 111 | + name: spec (nix-latest) |
| 112 | + |
| 113 | + runs-on: ubuntu-latest |
| 114 | + |
| 115 | + services: |
| 116 | + nix: |
| 117 | + image: docker.io/nixos/nix:latest |
| 118 | + options: --tty |
| 119 | + volumes: |
| 120 | + - ${{ github.workspace }}:${{ github.workspace }} |
| 121 | + |
| 122 | + steps: |
| 123 | + - name: Checkout |
| 124 | + uses: actions/checkout@v4 |
| 125 | + |
| 126 | + - name: Setup shell |
| 127 | + run: | |
| 128 | + mkdir -p "$HOME/.local/bin" && tee "$HOME/.local/bin/bash" <<'EOF' && chmod a+x "$HOME/.local/bin/bash" |
| 129 | + #!/bin/bash -- |
| 130 | + exec docker exec -i -w "$PWD" ${{ job.services.nix.id }} nix-shell --packages ruby --run "exec \"\$SHELL\"$(test $# -gt 0 && printf ' %q' "${@:1:$#-1}")" <"${@:$#}" |
| 131 | + EOF |
| 132 | +
|
| 133 | + - name: Bundle |
| 134 | + run: bundle install |
| 135 | + |
| 136 | + - name: Compile |
| 137 | + run: bundle exec rake compile |
| 138 | + |
| 139 | + - name: Install |
| 140 | + run: rake -f -r bundler/gem_tasks install |
| 141 | + |
| 142 | + - name: Spec |
| 143 | + run: bundle exec rake spec |
| 144 | + |
| 145 | + spec-bsd: |
110 | 146 |
|
111 | 147 | name: spec (${{ matrix.vm }}-latest) |
112 | 148 |
|
@@ -137,41 +173,34 @@ jobs: |
137 | 173 | if: matrix.vm == 'openbsd' |
138 | 174 | uses: vmactions/openbsd-vm@v1 |
139 | 175 |
|
140 | | - - name: Setup vmshell |
| 176 | + - name: Setup shell |
141 | 177 | 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 |
| 178 | + mkdir -p "$HOME/.local/bin" && tee "$HOME/.local/bin/bash" <<'EOF' && chmod a+x "$HOME/.local/bin/bash" |
| 179 | + #!/bin/bash -- |
| 180 | + exec ssh ${{ matrix.vm }} "cd $(printf %q "$PWD") && exec \"\$SHELL\"$(test $# -gt 0 && printf ' %q' "${@:1:$#-1}")" <"${@:$#}" |
146 | 181 | EOF |
147 | | - chmod a+x /home/runner/.local/bin/vmshell |
148 | 182 |
|
149 | 183 | - name: Install dependencies |
150 | 184 | run: ${{ matrix.install-dependencies }} |
151 | | - shell: vmshell {0} |
152 | 185 |
|
153 | 186 | - name: Bundle |
154 | 187 | run: bundle install |
155 | | - shell: vmshell {0} |
156 | 188 |
|
157 | 189 | - name: Compile |
158 | 190 | 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 | 191 |
|
161 | 192 | - name: Install |
162 | 193 | run: rake -f -r bundler/gem_tasks install |
163 | | - shell: vmshell {0} |
164 | 194 |
|
165 | 195 | # TODO: https://github.com/sass/dart-sass/pull/2413 |
166 | 196 | # - name: Spec |
167 | 197 | # run: bundle exec rake spec |
168 | | - # shell: freebsd {0} |
169 | 198 |
|
170 | 199 | release: |
171 | 200 |
|
172 | 201 | if: github.event.repository.fork == false && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) |
173 | 202 |
|
174 | | - needs: [lint, spec, spec-container, spec-vm] |
| 203 | + needs: [lint, spec, spec-musl, spec-nix, spec-bsd] |
175 | 204 |
|
176 | 205 | runs-on: ubuntu-latest |
177 | 206 |
|
|
0 commit comments