Test FreeBSD #2588
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - '**' | |
| tags-ignore: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby | |
| bundler-cache: true | |
| - name: Lint | |
| run: bundle exec rake rubocop | |
| spec: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - macos-latest | |
| - ubuntu-latest | |
| - windows-latest | |
| ruby-version: | |
| - '3.1' | |
| - '3.2' | |
| - '3.3' | |
| - jruby | |
| - truffleruby | |
| - truffleruby+graalvm | |
| exclude: | |
| - os: windows-latest | |
| ruby-version: truffleruby | |
| - os: windows-latest | |
| ruby-version: truffleruby+graalvm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| bundler-cache: true | |
| - name: Compile | |
| run: bundle exec rake compile | |
| - name: Spec | |
| run: bundle exec rake spec | |
| - name: Install | |
| run: rake -f -r bundler/gem_tasks install | |
| spec-linux-musl: | |
| name: spec (alpine-latest, ${{ matrix.ruby-version }}) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: docker.io/library/ruby:${{ matrix.ruby-version }}-alpine | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby-version: | |
| - '3.1' | |
| - '3.2' | |
| - '3.3' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: apk add build-base | |
| - name: Bundle | |
| run: bundle install | |
| - name: Compile | |
| run: bundle exec rake compile | |
| - name: Install | |
| run: rake -f -r bundler/gem_tasks install | |
| - name: Spec | |
| run: bundle exec rake spec | |
| spec-freebsd: | |
| name: spec (freebsd-latest) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup VM | |
| uses: vmactions/freebsd-vm@v1 | |
| - name: Setup Shell | |
| run: | | |
| _osname=freebsd | |
| tee /home/runner/.local/bin/$_osname <<EOF | |
| #!/usr/bin/env bash | |
| ssh $_osname "cd \$(printf %q "\$PWD") && exec \\\$SHELL -e"<\$1 | |
| EOF | |
| chmod a+x /home/runner/.local/bin/$_osname | |
| - name: Install dependencies | |
| run: pkg install -y node npm protobuf ruby rubygem-bundler rubygem-rake | |
| shell: freebsd {0} | |
| - name: Bundle | |
| run: bundle install | |
| shell: freebsd {0} | |
| - name: Compile | |
| run: EMBEDDED_SASS_PROTOCOL=https://github.com/sass/sass/raw/HEAD/spec/embedded_sass.proto PROTOC_BIN=`which protoc` bundle exec rake compile | |
| shell: freebsd {0} | |
| - name: Install | |
| run: rake -f -r bundler/gem_tasks install | |
| shell: freebsd {0} | |
| - name: Test | |
| run: bundle exec sass --version | |
| shell: freebsd {0} | |
| # TODO: https://github.com/sass/dart-sass/pull/2413 | |
| # - name: Spec | |
| # run: bundle exec rake spec | |
| # shell: freebsd {0} | |
| release: | |
| if: github.event.repository.fork == false && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
| needs: [lint, spec, spec-linux-musl, spec-freebsd] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ssh-key: ${{ secrets.DEPLOY_KEY }} | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby | |
| - name: Release | |
| run: | | |
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| git config user.name github-actions[bot] | |
| rake -f -r bundler/gem_tasks release gem_push=no |