Another update #581
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: | |
tags: | |
- v* | |
branches: | |
- main | |
pull_request: | |
jobs: | |
scalafmt: | |
name: Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- uses: coursier/setup-action@v1.3.5 | |
with: | |
apps: scalafmt | |
jvm: "temurin:17" | |
- name: Check formatting | |
run: .github/fmt.sh --test | |
bridges: | |
name: Server bridges tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- uses: coursier/setup-action@v1.3.0 | |
with: | |
jvm: "temurin:17" | |
apps: sbt | |
- name: Tests | |
run: | | |
.github/setup-test-projects.sh &&\ | |
./mill -i "bridges.scalajs-1[_].publishLocal" &&\ | |
./mill -i "bridges.scala-native-04[_].publishLocal" &&\ | |
./mill -i "bridges.scala-native-05[_].publishLocal" &&\ | |
./mill -i "bridges.scalajs-1[_].test" &&\ | |
./mill -i "bridges.scala-native-04[_].test" &&\ | |
./mill -i "bridges.scala-native-05[_].test" | |
shell: bash | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
name: Server tests | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- uses: coursier/setup-action@v1.3.0 | |
with: | |
jvm: "temurin:17" | |
apps: sbt | |
- name: Compile and test main projects | |
# Only running the tests in 2.12 for now. Many test fixtures need | |
# to be updated for 2.13. | |
run: | | |
.github/setup-test-projects.sh &&\ | |
./mill -i 'backend[_].test.compile' &&\ | |
./mill -i 'frontend[_].test.compile' &&\ | |
./mill -i 'backend[2.12.19].test' &&\ | |
./mill -i 'frontend[2.12.19].test' | |
shell: bash | |
jvm-tests: | |
name: Client JVM tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: coursier/cache-action@v6.4 | |
- uses: coursier/setup-action@v1.3.0 | |
with: | |
jvm: "zulu:17" | |
- run: | | |
./mill -i integration.test.jvm | |
if: runner.os != 'Windows' | |
- run: | | |
@call ./mill.bat -i integration.test.jvm | |
shell: cmd | |
if: runner.os == 'Windows' | |
native-tests: | |
name: Client native tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: coursier/cache-action@v6.4 | |
- uses: coursier/setup-action@v1.3.0 | |
with: | |
jvm: "zulu:17" | |
- run: | | |
./mill -i "cli.writeNativeImageScript" generate.sh "" &&\ | |
export USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM=false &&\ | |
./generate.sh &&\ | |
./mill -i "cli.copyToArtifacts" artifacts/ | |
if: runner.os != 'Windows' | |
- run: | | |
export USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM=false | |
.github/scripts/generate-native-image-windows.sh | |
shell: bash | |
if: runner.os == 'Windows' | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: launchers | |
path: artifacts/ | |
if-no-files-found: error | |
retention-days: 1 | |
- run: | | |
./mill -i "integration.test.native" | |
if: github.event_name == 'push' && runner.os != 'Windows' | |
- run: | | |
./mill.bat -i integration.test.native | |
if: github.event_name == 'push' && runner.os == 'Windows' | |
shell: bash | |
upload-launchers: | |
name: Upload CLI | |
needs: [scalafmt, jvm-tests, native-tests] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: coursier/cache-action@v6.4 | |
- uses: coursier/setup-action@v1.3.0 | |
with: | |
jvm: "zulu:17" | |
- uses: actions/download-artifact@v3 | |
with: | |
name: launchers | |
path: artifacts/ | |
- run: ./mill -i ci.upload artifacts/ | |
env: | |
UPLOAD_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- uses: coursier/setup-action@v1.3.0 | |
with: | |
jvm: "temurin:17" | |
- name: GPG setup | |
run: .github/scripts/gpg-setup.sh | |
env: | |
PGP_SECRET: ${{ secrets.PUBLISH_SECRET_KEY }} | |
- name: Release | |
run: ./mill -i internal.publishSonatype __.publishArtifacts | |
env: | |
PGP_PASSWORD: ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }} | |
SONATYPE_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.PUBLISH_USER }} |