Skip to content

Commit

Permalink
update actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed May 17, 2024
1 parent bb04df3 commit 2c2fd32
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 30 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ name: Release
on: [workflow_dispatch] # Manual trigger
jobs:
buildJava:
runs-on: ubuntu-20.04
container:
image: openjdk:17-jdk
options: --user root
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew build publish --stacktrace
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: 17
cache: 'gradle'
- uses: gradle/actions/wrapper-validation@v3
- name: Grant execute permission for Gradle wrapper
run: chmod +x ./gradlew
- run: ./gradlew assemble publish --stacktrace
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
Expand All @@ -24,21 +28,22 @@ jobs:
strategy:
matrix:
target: [ x86_64, i686, aarch64 ]
runs-on: windows-2019
runs-on: windows-latest
steps:
# TODO: Fix macOS in future
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: rustup target add ${{ matrix.target }}-pc-windows-msvc
- uses: actions/setup-java@v2
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
distribution: 'microsoft'
java-version: '17'
- uses: gradle/wrapper-validation-action@v1
cache: 'gradle'
- uses: gradle/actions/wrapper-validation@v3
- run: ./gradlew build copyForNative
- name: Run Cargo
run: cargo build --release --target ${{ matrix.target }}-pc-windows-msvc
working-directory: ./native
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: Artifacts ${{ matrix.target }}
path: target/${{ matrix.target }}-pc-windows-msvc/release/quilt-installer.exe
Expand Down
35 changes: 19 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,33 @@ name: Test
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
java: [17-jdk]
runs-on: ubuntu-20.04
container:
image: openjdk:${{ matrix.java }}
options: --user root
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew build test --stacktrace
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: 17
cache: 'gradle'
- uses: gradle/actions/wrapper-validation@v3
- name: Grant execute permission for Gradle wrapper
run: chmod +x ./gradlew
- run: ./gradlew build --stacktrace

buildNatives:
strategy:
matrix:
target: [ x86_64, i686, aarch64 ]
runs-on: windows-2019
runs-on: windows-latest
steps:
# TODO: Fix macOS in future
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- uses: gradle/wrapper-validation-action@v1
distribution: 'microsoft'
java-version: 17
cache: 'gradle'
- uses: gradle/actions/wrapper-validation@v3
- run: ./gradlew build copyForNative --stacktrace
- run: rustup target add ${{ matrix.target }}-pc-windows-msvc
- name: Run Cargo
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ tasks.shadowJar {
from(sourceSets["java8"].output)
}

tasks.build {
tasks.assemble {
dependsOn(tasks.shadowJar)
}

Expand Down

0 comments on commit 2c2fd32

Please sign in to comment.