Fold sbtw into client-test.yml: build + smoke test; remove sbtw-release.yml

This commit is contained in:
bitloi 2026-02-15 05:31:14 +01:00
parent b25545623f
commit 11259109a4
2 changed files with 9 additions and 57 deletions

View File

@ -51,8 +51,9 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' }}
shell: bash
run: |
# test building sbtn on Linux
# test building sbtn and sbtw on Linux
sbt "-Dsbt.io.virtual=false" nativeImage
sbt "-Dsbt.io.virtual=false" sbtwProj/nativeImage
# smoke test native Image
./client/target/bin/sbtn --sbt-script=$(pwd)/sbt about
./client/target/bin/sbtn --sbt-script=$(pwd)/sbt shutdown
@ -69,8 +70,9 @@ jobs:
if: ${{ matrix.os == 'macos-latest' }}
shell: bash
run: |
# test building sbtn on macOS
# test building sbtn and sbtw on macOS
./sbt "-Dsbt.io.virtual=false" nativeImage
./sbt "-Dsbt.io.virtual=false" sbtwProj/nativeImage
# test launcher script
launcher-package/bin/coursier resolve
sbt -Dsbt.build.version=$TEST_SBT_VER launcherPackageIntegrationTest/test
@ -84,15 +86,18 @@ jobs:
max_attempts: 3
shell: bash
command: |
# test building sbtn on Windows
# test building sbtn and sbtw on Windows
sbt "-Dsbt.io.virtual=false" nativeImage
sbt "-Dsbt.io.virtual=false" sbtwProj/nativeImage
- name: Client test (Windows)
if: ${{ matrix.os == 'windows-latest' }}
shell: bash
run: |
# smoke test native Image
# smoke test native Image (sbtn)
./client/target/bin/sbtn --sbt-script=$(pwd)/launcher-package/src/universal/bin/sbt.bat about
./client/target/bin/sbtn --sbt-script=$(pwd)/launcher-package/src/universal/bin/sbt.bat shutdown
# smoke test sbtw (Windows launcher)
if [ -f sbtw/target/bin/sbtw.exe ]; then ./sbtw/target/bin/sbtw.exe --help; else ./sbtw/target/bin/sbtw --help; fi
# test launcher script
echo build using JDK 17 test using JDK 17 and JDK 25
launcher-package/bin/coursier.bat resolve

View File

@ -1,53 +0,0 @@
name: sbtw Release
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-upload:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Setup JDK
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "23"
cache: sbt
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Windows C++ toolchain
uses: ilammy/msvc-dev-cmd@v1
- name: Build sbtw native image
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
shell: bash
command: sbt -Dsbt.io.virtual=false sbtw/nativeImage
env:
JAVA_OPTS: -Xms800M -Xmx2G -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dfile.encoding=UTF-8
- name: Upload sbtw to Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.release.tag_name }}
files: sbtw/target/bin/sbtw*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload sbtw artifact (manual run)
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: sbtw-windows-${{ github.sha }}
path: sbtw/target/bin/sbtw*