Skip to content

Upgrade: Bump actions/cache from 4.1.1 to 4.2.0 #439

Upgrade: Bump actions/cache from 4.1.1 to 4.2.0

Upgrade: Bump actions/cache from 4.1.1 to 4.2.0 #439

Workflow file for this run

name: "[GraalVM] Build All"
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
GH_SBT_OPTS: "-Xss64m -Xms2G -XX:MaxMetaspaceSize=1G -Xmx4G -XX:MaxInlineLevel=18 -XX:+UnlockExperimentalVMOptions"
GH_JVM_OPTS: "-Xss64m -Xms2G -XX:MaxMetaspaceSize=1G -Xmx4G -XX:MaxInlineLevel=18 -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler"
CLI_SCALA_VERSION: "3.3.0"
CLI_SCALA_BINARY_VERSION: "3"
GRAALVM_JAVA_VERSION: "17"
GRAALVM_BIN_DIR_NAME: "native-image"
jobs:
graalvm_build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
run-binary: [whatsub-cli]
steps:
- uses: actions/checkout@v4
- uses: olafurpg/setup-scala@v14
with:
java-version: ${{ env.GRAALVM_JAVA_VERSION }}
- name: Cache SBT
uses: actions/cache@v4.2.0
with:
path: |
~/.ivy2/cache
~/.cache/coursier
~/.sbt
key: ${{ runner.os }}-sbt-${{ env.CLI_SCALA_BINARY_VERSION }}-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-sbt-${{ env.CLI_SCALA_BINARY_VERSION }}-
- name: "GraalVM Build for Scala ${{ env.CLI_SCALA_VERSION }} - ${{ github.run_number }}"
env:
CURRENT_BRANCH_NAME: ${{ github.ref }}
RUN_ID: ${{ github.run_id }}
RUN_NUMBER: ${{ github.run_number }}
JVM_OPTS: ${{ env.GH_JVM_OPTS }}
SBT_OPTS: ${{ env.GH_SBT_OPTS }}
run: |
echo "JVM_OPTS=${JVM_OPTS}"
echo "SBT_OPTS=${SBT_OPTS}"
sbt \
-v \
++${{ env.CLI_SCALA_VERSION }}! \
clean \
test \
nativeImage
rm -f modules/*/target/scala-*/*.jar
ls -lGh modules/whatsub-cli/target/${{ env.GRAALVM_BIN_DIR_NAME }}/
sh -c "modules/whatsub-cli/target/${{ env.GRAALVM_BIN_DIR_NAME }}/${{ matrix.run-binary }} --version"
sh -c "modules/whatsub-cli/target/${{ env.GRAALVM_BIN_DIR_NAME }}/${{ matrix.run-binary }} --help"
sh -c "modules/whatsub-cli/target/${{ env.GRAALVM_BIN_DIR_NAME }}/${{ matrix.run-binary }} convert --help"
graalvm_build_windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
run-binary: [whatsub-cli]
steps:
- name: Configure git
run: "git config --global core.autocrlf false"
shell: bash
- uses: actions/checkout@v4
- uses: olafurpg/setup-scala@v14
with:
java-version: ${{ env.GRAALVM_JAVA_VERSION }}
- uses: ilammy/msvc-dev-cmd@v1
- name: Cache SBT
uses: actions/cache@v4.2.0
with:
path: |
~/.ivy2/cache
~/.cache/coursier
~/.sbt
key: ${{ runner.os }}-sbt-${{ env.CLI_SCALA_BINARY_VERSION }}-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-sbt-${{ env.CLI_SCALA_BINARY_VERSION }}-
- name: "GraalVM Build for Scala ${{ env.CLI_SCALA_VERSION }} - ${{ github.run_number }}"
shell: bash
env:
CURRENT_BRANCH_NAME: ${{ github.ref }}
RUN_ID: ${{ github.run_id }}
RUN_NUMBER: ${{ github.run_number }}
JVM_OPTS: ${{ env.GH_JVM_OPTS }}
SBT_OPTS: ${{ env.GH_SBT_OPTS }}
run: |
echo "JVM_OPTS=${JVM_OPTS}"
echo "SBT_OPTS=${SBT_OPTS}"
sbt \
-v \
++${{ env.CLI_SCALA_VERSION }}! \
clean \
test \
nativeImage
rm -f modules/*/target/scala-*/*.jar
ls -lGh modules/whatsub-cli/target/${{ env.GRAALVM_BIN_DIR_NAME }}/
sh -c "modules/whatsub-cli/target/${{ env.GRAALVM_BIN_DIR_NAME }}/${{ matrix.run-binary }} --version"
sh -c "modules/whatsub-cli/target/${{ env.GRAALVM_BIN_DIR_NAME }}/${{ matrix.run-binary }} --help"
sh -c "modules/whatsub-cli/target/${{ env.GRAALVM_BIN_DIR_NAME }}/${{ matrix.run-binary }} convert --help"