diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 579b0dd..26ddf21 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -17,28 +17,18 @@ jobs: build-jvm: name: Build JVM runs-on: ubuntu-latest + container: + image: maven:3.9.6-eclipse-temurin-21 steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up JDK 21 - uses: actions/setup-java@v4 + - name: Cache Maven repository + uses: actions/cache@v4 with: - distribution: temurin - java-version: 21 - cache: maven - - - name: Install Maven - env: - MAVEN_VERSION: 3.9.6 - MAVEN_HOME: ${{ runner.workspace }}/.maven - run: | - mkdir -p "$MAVEN_HOME" - if [ ! -x "$MAVEN_HOME/bin/mvn" ]; then - curl -fsSL "https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz" | tar -xz -C "$MAVEN_HOME" --strip-components=1 - fi - echo "$MAVEN_HOME/bin" >> "$GITHUB_PATH" - mvn --version + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- - name: Cache Node + npm uses: actions/cache@v4 @@ -61,28 +51,18 @@ jobs: build-native: name: Build Native runs-on: ubuntu-latest + container: + image: maven:3.9.6-eclipse-temurin-21 steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up JDK 21 - uses: actions/setup-java@v4 + - name: Cache Maven repository + uses: actions/cache@v4 with: - distribution: temurin - java-version: 21 - cache: maven - - - name: Install Maven - env: - MAVEN_VERSION: 3.9.6 - MAVEN_HOME: ${{ runner.workspace }}/.maven - run: | - mkdir -p "$MAVEN_HOME" - if [ ! -x "$MAVEN_HOME/bin/mvn" ]; then - curl -fsSL "https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz" | tar -xz -C "$MAVEN_HOME" --strip-components=1 - fi - echo "$MAVEN_HOME/bin" >> "$GITHUB_PATH" - mvn --version + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- - name: Set up GraalVM uses: graalvm/setup-graalvm@v1