Skip to content

configuration.md examples "using dep" to current versions (#2398) #7742

configuration.md examples "using dep" to current versions (#2398)

configuration.md examples "using dep" to current versions (#2398) #7742

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
unit-tests:
timeout-minutes: 120
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Copy launcher
run: ./mill -i copyJvmLauncher artifacts/
if: runner.os == 'Linux'
- name: Copy bootstrapped launcher
run: ./mill -i copyJvmBootstrappedLauncher artifacts/
if: runner.os == 'Linux'
- uses: actions/upload-artifact@v3
if: runner.os == 'Linux'
with:
name: launchers
path: artifacts/
if-no-files-found: error
retention-days: 2
- name: Compile everything
run: ./mill -i __.compile
- name: Unit tests
run: ./mill -i unitTests
jvm-tests-1:
timeout-minutes: 120
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: JVM integration tests
run: ./mill -i integration.test.jvm
env:
SCALA_CLI_IT_GROUP: 1
- name: Fat jar integration test
run: ./mill integration.test.jvmBootstrapped 'scala.cli.integration.StandaloneLauncherTests.*'
jvm-tests-2:
timeout-minutes: 120
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: JVM integration tests
run: ./mill -i integration.test.jvm
env:
SCALA_CLI_IT_GROUP: 2
jvm-tests-3:
timeout-minutes: 120
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: JVM integration tests
run: ./mill -i integration.test.jvm
env:
SCALA_CLI_IT_GROUP: 3
generate-linux-launcher:
timeout-minutes: 120
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Generate native launcher
run: .github/scripts/generate-native-image.sh
- run: ./mill -i ci.setShouldPublish
- name: Build OS packages
if: env.SHOULD_PUBLISH == 'true'
run: .github/scripts/generate-os-packages.sh
- name: Copy artifacts
run: ./mill -i copyDefaultLauncher artifacts/
- uses: actions/upload-artifact@v3
with:
name: linux-launchers
path: artifacts/
if-no-files-found: error
retention-days: 2
native-linux-tests-1:
needs: generate-linux-launcher
timeout-minutes: 120
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: linux-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i nativeIntegrationTests
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 1
SCALA_CLI_SODIUM_JNI_ALLOW: false
native-linux-tests-2:
needs: generate-linux-launcher
timeout-minutes: 120
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: linux-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i nativeIntegrationTests
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 2
SCALA_CLI_SODIUM_JNI_ALLOW: false
native-linux-tests-3:
needs: generate-linux-launcher
timeout-minutes: 120
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: linux-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i nativeIntegrationTests
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 3
SCALA_CLI_SODIUM_JNI_ALLOW: false
generate-linux-arm64-native-launcher:
runs-on: "macOS-m1"
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
apps: ""
- name: Generate native launcher and generate os packages
run: .github/scripts/build-linux-aarch64.sh
- uses: actions/upload-artifact@v3
with:
name: linux-aarch64-launchers
path: artifacts/
if-no-files-found: error
retention-days: 2
generate-macos-launcher:
timeout-minutes: 120
runs-on: "macos-12"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Generate native launcher
run: .github/scripts/generate-native-image.sh
- run: ./mill -i ci.setShouldPublish
- name: Build OS packages
if: env.SHOULD_PUBLISH == 'true'
run: .github/scripts/generate-os-packages.sh
- name: Copy artifacts
run: ./mill -i copyDefaultLauncher artifacts/
- uses: actions/upload-artifact@v3
with:
name: macos-launchers
path: artifacts/
if-no-files-found: error
retention-days: 2
native-macos-tests-1:
needs: generate-macos-launcher
timeout-minutes: 120
runs-on: "macos-12"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: macos-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i nativeIntegrationTests
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 1
SCALA_CLI_SODIUM_JNI_ALLOW: false
native-macos-tests-2:
needs: generate-macos-launcher
timeout-minutes: 120
runs-on: "macos-12"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: macos-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i nativeIntegrationTests
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 2
SCALA_CLI_SODIUM_JNI_ALLOW: false
native-macos-tests-3:
needs: generate-macos-launcher
timeout-minutes: 120
runs-on: "macos-12"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: macos-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i nativeIntegrationTests
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 3
SCALA_CLI_SODIUM_JNI_ALLOW: false
generate-macos-m1-launcher:
timeout-minutes: 120
runs-on: "macOS-m1"
if: github.event_name == 'push' && github.repository == 'VirtusLab/scala-cli'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: coursier/setup-action@6a582d7f7292a865e72c497ca64c3ef447cdb6c7
with:
apps: ""
jvm: "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.2.0/graalvm-ce-java17-darwin-aarch64-22.2.0.tar.gz"
- name: Generate native launcher
run: .github/scripts/generate-native-image.sh
- run: ./mill -i ci.setShouldPublish
- name: Build OS packages
if: env.SHOULD_PUBLISH == 'true'
run: .github/scripts/generate-os-packages.sh
- name: Copy artifacts
run: ./mill -i copyDefaultLauncher artifacts/
- uses: actions/upload-artifact@v3
with:
name: macos-m1-launchers
path: artifacts/
if-no-files-found: error
retention-days: 2
native-macos-m1-tests:
needs: generate-macos-m1-launcher
timeout-minutes: 120
runs-on: "macOS-m1"
if: github.event_name == 'push' && github.repository == 'VirtusLab/scala-cli'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: coursier/setup-action@6a582d7f7292a865e72c497ca64c3ef447cdb6c7
with:
apps: ""
jvm: "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.2.0/graalvm-ce-java17-darwin-aarch64-22.2.0.tar.gz"
- uses: actions/download-artifact@v3
with:
name: macos-m1-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i nativeIntegrationTests
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_SODIUM_JNI_ALLOW: false
generate-windows-launcher:
timeout-minutes: 120
runs-on: "windows-2019"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Get latest coursier launcher
run: .github/scripts/get-latest-cs.sh
shell: bash
- name: Generate native launcher
run: .github/scripts/generate-native-image.sh
shell: bash
- run: ./mill -i ci.setShouldPublish
- name: Build OS packages
if: env.SHOULD_PUBLISH == 'true'
run: .github/scripts/generate-os-packages.sh
shell: bash
- name: Copy artifacts
run: ./mill -i copyDefaultLauncher artifacts/
- uses: actions/upload-artifact@v3
with:
name: windows-launchers
path: artifacts/
if-no-files-found: error
retention-days: 2
native-windows-tests-1:
needs: generate-windows-launcher
timeout-minutes: 120
runs-on: "windows-2019"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Get latest coursier launcher
run: .github/scripts/get-latest-cs.sh
shell: bash
- uses: actions/download-artifact@v3
with:
name: windows-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i nativeIntegrationTests
env:
COURSIER_JNI: force
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 1
SCALA_CLI_SODIUM_JNI_ALLOW: false
native-windows-tests-2:
needs: generate-windows-launcher
timeout-minutes: 120
runs-on: "windows-2019"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Get latest coursier launcher
run: .github/scripts/get-latest-cs.sh
shell: bash
- uses: actions/download-artifact@v3
with:
name: windows-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i nativeIntegrationTests
env:
COURSIER_JNI: force
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 2
SCALA_CLI_SODIUM_JNI_ALLOW: false
native-windows-tests-3:
needs: generate-windows-launcher
timeout-minutes: 120
runs-on: "windows-2019"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Get latest coursier launcher
run: .github/scripts/get-latest-cs.sh
shell: bash
- uses: actions/download-artifact@v3
with:
name: windows-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i nativeIntegrationTests
env:
COURSIER_JNI: force
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 3
SCALA_CLI_SODIUM_JNI_ALLOW: false
generate-mostly-static-launcher:
timeout-minutes: 120
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Generate native launcher
run: .github/scripts/generate-native-image.sh mostly-static
shell: bash
- name: Copy artifacts
run: ./mill -i copyMostlyStaticLauncher artifacts/
- uses: actions/upload-artifact@v3
with:
name: mostly-static-launchers
path: artifacts/
if-no-files-found: error
retention-days: 2
native-mostly-static-tests-1:
needs: generate-mostly-static-launcher
timeout-minutes: 120
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: mostly-static-launchers
path: artifacts/
- name: Build slim docker image
run: .github/scripts/generate-slim-docker-image.sh
- name: Native integration tests
run: ./mill -i integration.test.nativeMostlyStatic
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 1
SCALA_CLI_SODIUM_JNI_ALLOW: false
- name: Docker integration tests
run: ./mill integration.docker-slim.test
- name: Login to GitHub Container Registry
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push slim scala-cli image to github container registry
if: startsWith(github.ref, 'refs/tags/v')
run: .github/scripts/publish-slim-docker-images.sh
native-mostly-static-tests-2:
needs: generate-mostly-static-launcher
timeout-minutes: 120
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: mostly-static-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i integration.test.nativeMostlyStatic
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 2
SCALA_CLI_SODIUM_JNI_ALLOW: false
native-mostly-static-tests-3:
needs: generate-mostly-static-launcher
timeout-minutes: 120
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: mostly-static-launchers
path: artifacts/
- name: Native integration tests
run: ./mill -i integration.test.nativeMostlyStatic
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 3
SCALA_CLI_SODIUM_JNI_ALLOW: false
generate-static-launcher:
timeout-minutes: 120
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Generate native launcher
run: .github/scripts/generate-native-image.sh static
shell: bash
- name: Copy artifacts
run: ./mill -i copyStaticLauncher artifacts/
- uses: actions/upload-artifact@v3
with:
name: static-launchers
path: artifacts/
if-no-files-found: error
retention-days: 2
native-static-tests-1:
needs: generate-static-launcher
timeout-minutes: 120
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: static-launchers
path: artifacts/
- name: Build docker image
run: .github/scripts/generate-docker-image.sh
- name: Native integration tests
run: ./mill -i integration.test.nativeStatic
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 1
SCALA_CLI_SODIUM_JNI_ALLOW: false
- name: Docker integration tests
run: ./mill integration.docker.test
- name: Login to GitHub Container Registry
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push scala-cli to github container registry
if: startsWith(github.ref, 'refs/tags/v')
run: .github/scripts/publish-docker-images.sh
native-static-tests-2:
needs: generate-static-launcher
timeout-minutes: 120
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: static-launchers
path: artifacts/
- name: Build docker image
run: .github/scripts/generate-docker-image.sh
- name: Native integration tests
run: ./mill -i integration.test.nativeStatic
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 2
SCALA_CLI_SODIUM_JNI_ALLOW: false
native-static-tests-3:
needs: generate-static-launcher
timeout-minutes: 120
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: static-launchers
path: artifacts/
- name: Build docker image
run: .github/scripts/generate-docker-image.sh
- name: Native integration tests
run: ./mill -i integration.test.nativeStatic
env:
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
SCALA_CLI_IT_GROUP: 3
SCALA_CLI_SODIUM_JNI_ALLOW: false
docs-tests:
# for now, let's run those tests only on ubuntu
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "zulu:17"
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Build documentation
run: .github/scripts/build-website.sh
- name: Test documentation
run: ./mill -i docs-tests.test
checks:
timeout-minutes: 15
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Check Scala / Scala.js versions in doc
run: ./mill -i ci.checkScalaVersions
- name: Check native-image config format
run: ./mill -i __.checkNativeImageConfFormat
- name: Check Ammonite availability
run: ./mill -i 'dummy.amm[_].resolvedRunIvyDeps'
- name: Scalafix check
run: |
./mill -i __.fix --check || (
echo "To remove unused import run"
echo " ./mill -i __.fix"
exit 1
)
format:
timeout-minutes: 15
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
apps: scalafmt:3.0.0
- run: scalafmt --check
reference-doc:
timeout-minutes: 15
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Check that reference doc is up-to-date
run: |
./mill -i generate-reference-doc.run --check || (
echo "Reference doc is not up-to-date. Run"
echo " ./mill -i generate-reference-doc.run"
echo "to update it, then commit the result."
exit 1
)
bloop-memory-footprint:
timeout-minutes: 120
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Java Version
run: java -version
- name: Java Home
run: echo "$JAVA_HOME"
- name: Build Scala CLI
run: ./mill copyJvmLauncher build
- name: Build Benchmark
run: java -jar ./build/scala-cli --power package --standalone gcbenchmark/gcbenchmark.scala -o gc
- name: Run Benchmark
run: ./gc $(realpath ./build/scala-cli)
test-hypothetical-sbt-export:
timeout-minutes: 120
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: Try to export to SBT
run: scala-cli --power export --sbt .
vc-redist:
timeout-minutes: 15
runs-on: "windows-2019"
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'Virtuslab/scala-cli'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- run: ./mill -i ci.copyVcRedist
- uses: actions/upload-artifact@v3
with:
name: launchers
path: artifacts/
if-no-files-found: warn
retention-days: 2
publish:
needs: [unit-tests, jvm-tests-1, jvm-tests-2, jvm-tests-3, format, checks, reference-doc]
if: github.event_name == 'push' && github.repository == 'VirtusLab/scala-cli'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
ssh-key: ${{ secrets.SSH_PRIVATE_KEY_SCALA_CLI }}
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- name: GPG setup
run: .github/scripts/gpg-setup.sh
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
- run: ./mill -i ci.setShouldPublish
- run: ./mill -i publishSonatype __.publishArtifacts
if: env.SHOULD_PUBLISH == 'true'
env:
PGP_PASSWORD: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
- uses: webfactory/ssh-agent@d4b9b8ff72958532804b70bbe600ad43b36d5f2e
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_SCALA_CLI }}
- name: Update stable branch
if: env.SHOULD_PUBLISH == 'true' && startsWith(github.ref, 'refs/tags/v')
run: |
git config user.name gh-actions
git config user.email [email protected]
git checkout stable
git merge origin/main -m "Back port of documentation changes to stable"
git push origin stable
launchers:
timeout-minutes: 20
needs:
- unit-tests
- jvm-tests-1
- jvm-tests-2
- jvm-tests-3
- native-linux-tests-1
- native-linux-tests-2
- native-linux-tests-3
- native-macos-tests-1
- native-macos-tests-2
- native-macos-tests-3
- native-macos-m1-tests
- native-windows-tests-1
- native-windows-tests-2
- native-windows-tests-3
- native-mostly-static-tests-1
- native-mostly-static-tests-2
- native-mostly-static-tests-3
- native-static-tests-1
- native-static-tests-2
- native-static-tests-3
- vc-redist
- format
- checks
- reference-doc
- generate-linux-arm64-native-launcher
if: github.event_name == 'push'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- run: ./mill -i ci.setShouldPublish
- uses: actions/download-artifact@v3
if: env.SHOULD_PUBLISH == 'true'
with:
name: linux-launchers
path: artifacts/
- uses: actions/download-artifact@v3
if: env.SHOULD_PUBLISH == 'true'
with:
name: linux-aarch64-launchers
path: artifacts/
- uses: actions/download-artifact@v3
if: env.SHOULD_PUBLISH == 'true'
with:
name: macos-launchers
path: artifacts/
- uses: actions/download-artifact@v3
if: env.SHOULD_PUBLISH == 'true'
with:
name: macos-m1-launchers
path: artifacts/
- uses: actions/download-artifact@v3
if: env.SHOULD_PUBLISH == 'true'
with:
name: windows-launchers
path: artifacts/
- uses: actions/download-artifact@v3
if: env.SHOULD_PUBLISH == 'true'
with:
name: mostly-static-launchers
path: artifacts/
- uses: actions/download-artifact@v3
if: env.SHOULD_PUBLISH == 'true'
with:
name: static-launchers
path: artifacts/
- uses: actions/download-artifact@v3
if: env.SHOULD_PUBLISH == 'true'
with:
name: launchers
path: artifacts/
- run: ./mill -i uploadLaunchers artifacts/
if: env.SHOULD_PUBLISH == 'true'
env:
UPLOAD_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-packages:
name: Update packages
needs: launchers
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'VirtusLab/scala-cli'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: linux-launchers
path: artifacts/
- uses: actions/download-artifact@v3
with:
name: linux-aarch64-launchers
path: artifacts/
- uses: actions/download-artifact@v3
with:
name: macos-launchers
path: artifacts/
- uses: actions/download-artifact@v3
with:
name: macos-m1-launchers
path: artifacts/
- uses: actions/download-artifact@v3
with:
name: windows-launchers
path: artifacts/
- uses: actions/download-artifact@v3
with:
name: mostly-static-launchers
path: artifacts/
- uses: actions/download-artifact@v3
with:
name: static-launchers
path: artifacts/
- uses: actions/download-artifact@v3
with:
name: launchers
path: artifacts/
- name: Display structure of downloaded files
run: ls -R
working-directory: artifacts/
- uses: webfactory/ssh-agent@d4b9b8ff72958532804b70bbe600ad43b36d5f2e
with:
ssh-private-key: |
${{ secrets.SCALA_CLI_PACKAGES_KEY }}
${{ secrets.HOMEBREW_SCALA_CLI_KEY }}
${{ secrets.HOMEBREW_SCALA_EXPERIMENTAL_KEY }}
${{ secrets.SCALA_CLI_SETUP_KEY }}
- run: ./mill -i ci.updateInstallationScript
- run: ./mill -i ci.updateScalaCliBrewFormula
- name: GPG setup
run: .github/scripts/gpg-setup.sh
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
- run: ./mill -i ci.updateDebianPackages
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
GPG_EMAIL: ${{ secrets.GPG_EMAIL }}
- run: ./mill -i ci.updateCentOsPackages
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
KEYGRIP: ${{ secrets.KEYGRIP }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
GPG_EMAIL: ${{ secrets.GPG_EMAIL }}
- run: ./mill -i ci.updateStandaloneLauncher
env:
UPLOAD_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to SDKMAN
run: .github/scripts/publish-sdkman.sh
shell: bash
env:
SDKMAN_KEY: ${{ secrets.SDKMAN_KEY }}
SDKMAN_TOKEN: ${{ secrets.SDKMAN_TOKEN }}
- run: ./mill -i ci.updateScalaCliSetup
- run: ./mill -i ci.updateScalaExperimentalBrewFormula
update-windows-packages:
name: Update Windows packages
needs: launchers
runs-on: "windows-2019"
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'VirtusLab/scala-cli'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@a4c8b538a26205b4f92c3253f4661735b029f6e6
with:
jvm: "temurin:17"
- uses: actions/download-artifact@v3
with:
name: windows-launchers
path: artifacts/
- name: Publish to chocolatey
run: ./mill -i ci.updateChocolateyPackage
env:
CHOCO_SECRET: ${{ secrets.CHOCO_SECRET_KEY }}
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: VirtusLab.ScalaCLI
installers-regex: '\.msi$'
fork-user: scala-steward
token: ${{ secrets.STEWARD_WINGET_TOKEN }}