Make installer #67
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: Make installer | |
on: | |
workflow_dispatch: | |
inputs: | |
sbt_ver: | |
description: the version of sbt to release | |
required: true | |
default: 1.4.x | |
dist_patchver: | |
description: patch version if needed | |
required: true | |
default: 0 | |
jobs: | |
test: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
java: 8 | |
distribution: temurin | |
jobtype: 1 | |
- os: windows-latest | |
java: 8 | |
distribution: temurin | |
jobtype: 2 | |
runs-on: ${{ matrix.os }} | |
env: | |
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M | |
SBT_VER: ${{ github.event.inputs.sbt_ver }} | |
DIST_PATCHVER: ${{ github.event.inputs.dist_patchver }} | |
steps: | |
- name: Checkout sbt/sbt-dist | |
uses: actions/checkout@v2 | |
- name: Checkout sbt/sbt | |
uses: actions/checkout@v2 | |
with: | |
repository: sbt/sbt | |
ref: v${{ github.event.inputs.sbt_ver }} | |
path: sbt | |
- name: Setup JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: "${{ matrix.distribution }}" | |
java-version: "${{ matrix.java }}" | |
- name: Coursier cache | |
uses: coursier/cache-action@v6 | |
- name: Cache sbt | |
uses: actions/[email protected] | |
with: | |
path: ~/.sbt | |
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | |
- name: Build (1) | |
if: ${{ matrix.jobtype == 1 }} | |
shell: bash | |
run: | | |
mode=build bin/run-ci.sh | |
- name: Build (2) | |
if: ${{ matrix.jobtype == 2 }} | |
shell: bash | |
run: | | |
mode=build bin/run-ci-win.sh | |
- name: Cleanup | |
shell: bash | |
run: | | |
rm -rf "$HOME/.ivy2/local" || true | |
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true | |
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true | |
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true | |
find $HOME/.sbt -name "*.lock" -delete || true | |
- name: Archive Windows installer artifacts | |
if: ${{ runner.os == 'Windows' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-${{ runner.os }} | |
path: sbt/launcher-package/target/windows | |
- name: Archive Linux installer artifacts | |
if: ${{ runner.os == 'Linux' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-${{ runner.os }} | |
path: sbt/launcher-package/target/universal |