Make cask multithreaded by default (#168) #676
Workflow file for this run
This file contains 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: ci | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: coursier/cache-action@v6 | |
- name: out folder cache | |
uses: actions/cache@v3 | |
with: | |
path: ./out | |
key: out-folder-cache | |
- name: Install Dependencies | |
run: | | |
curl -sL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - | |
echo "deb https://packages.nginx.org/unit/ubuntu/ jammy unit" | sudo tee -a /etc/apt/sources.list.d/unit.list | |
echo "deb-src https://packages.nginx.org/unit/ubuntu/ jammy unit" | sudo tee -a /etc/apt/sources.list.d/unit.list | |
sudo apt-get update | |
unit_version="1.32*" | |
sudo apt-get install -y libuv1-dev libidn2-dev unit=$unit_version unit-dev=$unit_version | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: "11" | |
architecture: "x64" | |
distribution: "temurin" | |
- name: Download dependencies | |
run: | |
./mill --disable-ticker __.prepareOffline | |
- name: Check formatting | |
run: | |
./mill --disable-ticker -j 0 mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources | |
# ./mill -j 0 mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll --sources buildSources | |
# - name: Check scalafix | |
# run: ./mill --disable-ticker __.fix --check | |
- name: Compile | |
run: ./mill --disable-ticker -j 0 __.compile | |
- name: Publish libraries locally | |
run: ./mill --disable-ticker -j 0 __.publishLocal | |
- name: Run Unit Tests | |
run: ./mill --disable-ticker snunit[_].test | |
- name: Run Integration Tests | |
run: | | |
sudo systemctl stop unit.service | |
./mill --disable-ticker integration.test | |
- name: Start NGINX Unit daemon | |
run: sudo systemctl start unit.service | |
# - name: Run Mill Plugin Tests | |
# run: ./mill --disable-ticker snunit-mill-plugin-itest.__.test | |
- name: Build and Test Sbt plugin | |
run: | | |
( | |
cd sbt-plugin | |
sudo systemctl start unit.service | |
sbt scalafmtCheckAll scalafmtSbtCheck scripted | |
) | |
check-binary-compatibility: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "11" | |
- name: Check Binary Compatibility | |
run: ./mill --disable-ticker __.mimaReportBinaryIssues | |
publish-sonatype: | |
if: github.repository == 'lolgab/snunit' && contains(github.ref, 'refs/tags/') | |
needs: build | |
runs-on: ubuntu-22.04 | |
env: | |
PGP_PASSPHRASE: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY_PASSWORD }} | |
PGP_SECRET: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY }} | |
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
LANG: "en_US.UTF-8" | |
LC_MESSAGES: "en_US.UTF-8" | |
LC_ALL: "en_US.UTF-8" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: coursier/cache-action@v6 | |
- name: Compilation cache | |
uses: actions/cache@v2 | |
with: | |
path: ./out | |
key: out | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "11" | |
- name: Publish plugin shared locally | |
run: ./mill --disable-ticker snunit-plugins-shared.__.publishLocal | |
- run: ./mill io.kipp.mill.ci.release.ReleaseModule/publishAll | |
env: | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
- name: Publish Sbt Plugin | |
run: | | |
if [[ $(git tag --points-at HEAD) != '' ]]; then | |
cd sbt-plugin | |
sbt publishSigned sonatypeBundleRelease | |
fi |