diff --git a/.github/workflows/native.yml b/.github/workflows/native.yml index d4af75e..869738b 100644 --- a/.github/workflows/native.yml +++ b/.github/workflows/native.yml @@ -13,10 +13,10 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-20.04 + - os: ubuntu-latest uploaded_filename: sbtn-x86_64-pc-linux local_path: client/target/bin/sbtn - - os: windows-2019 + - os: windows-latest uploaded_filename: sbtn-x86_64-pc-win32.exe local_path: client\target\bin\sbtn.exe env: @@ -33,15 +33,19 @@ jobs: with: distribution: temurin java-version: 8 + # cache: sbt + - name: Setup sbt + uses: sbt/setup-sbt@v1 - run: git fetch --tags || true - name: Setup Windows C++ toolchain uses: ilammy/msvc-dev-cmd@v1 - if: ${{ matrix.os == 'windows-2019' }} + if: ${{ matrix.os == 'windows-latest' }} - name: Build shell: bash run: | echo $(pwd) - sbt clean nativeImage + mkdir -p client/target/bin/ + sbt nativeImage - uses: actions/upload-artifact@v4 with: path: ${{ matrix.local_path }} @@ -83,17 +87,16 @@ jobs: with: distribution: temurin java-version: 17 - + # cache: sbt + - name: Setup sbt + uses: sbt/setup-sbt@v1 - run: git fetch --tags || true - name: Build shell: bash run: | - mkdir -p "$HOME/bin/" - curl -sL https://raw.githubusercontent.com/sbt/sbt/v1.9.9/sbt > "$HOME/bin/sbt" - export PATH="$PATH:$HOME/bin" - chmod +x "$HOME/bin/sbt" - sbt clean nativeImage + mkdir -p client/target/bin/ + sbt nativeImage - uses: actions/upload-artifact@v4 with: @@ -143,7 +146,7 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-20.04 + - os: ubuntu-22.04 uploaded_filename: sbtn-aarch64-pc-linux local_path: client/target/bin/sbtn env: @@ -159,15 +162,21 @@ jobs: with: distribution: temurin java-version: 8 - - name: Build Linux aarch64 + # cache: sbt + - name: Setup sbt + uses: sbt/setup-sbt@v1 + - name: Build Linux armv7 uses: uraimo/run-on-arch-action@v2 with: - arch: aarch64 - distro: ubuntu20.04 + arch: armv7 + distro: ubuntu22.04 # Speeds up builds per the run-on-arch-action README githubToken: ${{ github.token }} + dockerRunArgs: | + --volume "${PWD}:/opt" + # The shell to run commands with in the container shell: /bin/bash @@ -175,12 +184,10 @@ jobs: install: | apt-get update -q -y apt-get install -q -y curl openjdk-8-jdk build-essential libz-dev - mkdir -p "$HOME/bin/" - curl -sL https://raw.githubusercontent.com/sbt/sbt/v1.9.9/sbt > "$HOME/bin/sbt" - chmod +x "$HOME/bin/sbt" run: | - export PATH="$PATH:$HOME/bin" - sbt clean nativeImage + cd /opt + mkdir -p client/target/bin/ + sbt nativeImage - uses: actions/upload-artifact@v4 with: path: ${{ matrix.local_path }}