|
70 | 70 | - name: Install |
71 | 71 | run: rake -f -r bundler/gem_tasks install |
72 | 72 |
|
73 | | - spec-musl: |
| 73 | + spec-container: |
74 | 74 |
|
75 | 75 | name: spec (alpine-latest, ${{ matrix.ruby-version }}) |
76 | 76 |
|
@@ -106,11 +106,72 @@ jobs: |
106 | 106 | - name: Spec |
107 | 107 | run: bundle exec rake spec |
108 | 108 |
|
| 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 | + |
109 | 170 | release: |
110 | 171 |
|
111 | 172 | if: github.event.repository.fork == false && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) |
112 | 173 |
|
113 | | - needs: [lint, spec, spec-musl] |
| 174 | + needs: [lint, spec, spec-container, spec-vm] |
114 | 175 |
|
115 | 176 | runs-on: ubuntu-latest |
116 | 177 |
|
|
0 commit comments