Skip to content

Commit

Permalink
run on arch jdk 17
Browse files Browse the repository at this point in the history
  • Loading branch information
gotson committed Apr 29, 2024
1 parent 662fb09 commit a5df4fc
Showing 1 changed file with 156 additions and 155 deletions.
311 changes: 156 additions & 155 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,81 +31,82 @@ on:
- '.github/workflows/*.yml'

jobs:
lint:
name: Check code formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
java-package: jdk
cache: 'maven'
- name: spotless:check
run: mvn --batch-mode --no-transfer-progress spotless:check

test:
name: test ${{ matrix.os }} jdk${{ matrix.java }}
strategy:
matrix:
os: [ ubuntu-latest ]
java: [ 11, 17, 20 ]
include:
- os: windows-latest
java: 20
- os: macos-latest
java: 20
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
java-package: jdk
cache: 'maven'
- name: Test
run: mvn --batch-mode --no-transfer-progress test

test_graalvm:
name: test ${{ matrix.os }} jdk${{ matrix.java }} GraalVM native-image - ${{ matrix.profiles }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
java: [ '17', '21' ]
profiles: ['native', 'native,native-exported']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java }}
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test
run: mvn --batch-mode --no-transfer-progress -P ${{ matrix.profiles }} integration-test
# lint:
# name: Check code formatting
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-java@v4
# with:
# distribution: 'temurin'
# java-version: 11
# java-package: jdk
# cache: 'maven'
# - name: spotless:check
# run: mvn --batch-mode --no-transfer-progress spotless:check
#
# test:
# name: test ${{ matrix.os }} jdk${{ matrix.java }}
# strategy:
# matrix:
# os: [ ubuntu-latest ]
# java: [ 11, 17, 20 ]
# include:
# - os: windows-latest
# java: 20
# - os: macos-latest
# java: 20
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-java@v4
# with:
# distribution: 'temurin'
# java-version: ${{ matrix.java }}
# java-package: jdk
# cache: 'maven'
# - name: Test
# run: mvn --batch-mode --no-transfer-progress test
#
# test_graalvm:
# name: test ${{ matrix.os }} jdk${{ matrix.java }} GraalVM native-image - ${{ matrix.profiles }}
# strategy:
# matrix:
# os: [ ubuntu-latest, windows-latest, macos-latest ]
# java: [ '17', '21' ]
# profiles: ['native', 'native,native-exported']
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# - uses: graalvm/setup-graalvm@v1
# with:
# java-version: ${{ matrix.java }}
# distribution: 'graalvm-community'
# github-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Test
# run: mvn --batch-mode --no-transfer-progress -P ${{ matrix.profiles }} integration-test

test_multiarch:
name: test ${{ matrix.arch }} ${{ matrix.distro }} jdk${{ matrix.java }}
strategy:
fail-fast: false
matrix:
include:
# ARM v7
- arch: armv7
distro: ubuntu_latest
java: 11 # apt-get maven is 3.6.x, doesn't support Java 17
java: 17 # apt-get maven is 3.6.x, doesn't support Java 17
# ARM 64
- arch: aarch64
distro: ubuntu_latest
java: 11 # apt-get maven is 3.6.x, doesn't support Java 17
java: 17 # apt-get maven is 3.6.x, doesn't support Java 17
- arch: aarch64
distro: alpine_latest
java: 11
java: 17
# PPC64
- arch: ppc64le
distro: ubuntu_latest
java: 11 # apt-get maven is 3.6.x, doesn't support Java 17
java: 17 # apt-get maven is 3.6.x, doesn't support Java 17
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -154,100 +155,100 @@ jobs:
# Java tests with that native library, as some functions will not be available (extensions).
# Here we use the sqlite3 package installed by homebrew on Mac, which comes
# with the header file and library.
test_external_amalgamation:
name: test external amalgamation
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 20
java-package: jdk
cache: 'maven'
- run: brew install sqlite3
- name: Find SQLite directory
run: |
BREW_SQLITE_PREFIX=`brew --prefix sqlite3`
echo "SQLITE_DIR=$(dirname ${BREW_SQLITE_PREFIX})/$(readlink ${BREW_SQLITE_PREFIX})" | tee -a $GITHUB_ENV
- name: Make native lib
run: |
make native SQLITE_OBJ=${{ env.SQLITE_DIR }}/lib/libsqlite3.dylib SQLITE_HEADER=${{ env.SQLITE_DIR }}/include/sqlite3.h
- name: Test
run: mvn --batch-mode --no-transfer-progress test

release:
name: Deploy
needs: [ lint, test, test_multiarch, test_external_amalgamation, test_graalvm ]
if: github.repository_owner == 'xerial' && github.ref == 'refs/heads/master' # only perform on latest master
runs-on: ubuntu-latest
steps:
- name: Print inputs
run: |
echo "Perform release: ${{ inputs.perform_release }}"
- uses: actions/checkout@v4
if: github.event_name == 'push' || inputs.perform_release != true
# when performing a release we need the full git history to generate the changelog
- uses: actions/checkout@v4
if: inputs.perform_release
with:
fetch-depth: 0
- name: Set up Apache Maven Central
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '11'
java-package: jdk
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_CENTRAL_USERNAME # env variable for username in deploy (1)
server-password: MAVEN_CENTRAL_PASSWORD # env variable for token in deploy (2)
- name: Get Project Version
run: |
echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" | tee -a $GITHUB_ENV
- name: Cancel action for non SNAPSHOT push
if: github.event_name == 'push' && !endsWith(env.PROJECT_VERSION, '-SNAPSHOT')
uses: andymckay/cancel-action@0.4
# from that point, if inputs.perform_release is true we perform a release, else we deploy snapshot
- name: Prepare release
if: inputs.perform_release
run: |
mvn --no-transfer-progress versions:set -DremoveSnapshot -DgenerateBackupPoms=false
RELEASE_VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout`
echo "RELEASE_VERSION=${RELEASE_VERSION}" | tee -a $GITHUB_ENV
sed -i -e "s/^\:project-version\:\ .*/:project-version: ${RELEASE_VERSION}/g" README.adoc
- name: Build
run: mvn --batch-mode --no-transfer-progress package -P release -DskipTests

# The sonatype maven plugin will decide the right destination depending on whether the project is SNAPSHOT or not
- name: Publish to Apache Maven Central
if: github.event_name == 'push' || inputs.push_maven
run: mvn --batch-mode --no-transfer-progress deploy -P release -DskipTests -Dgpg.signer=bc
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }} # must be the same env variable name as (1)
MAVEN_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} # must be the same env variable name as (2)
MAVEN_GPG_KEY: ${{ secrets.GPG_KEY }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Release commit and push
if: inputs.perform_release
uses: EndBug/add-and-commit@v9
with:
message: 'chore(release): ${{ env.RELEASE_VERSION }} [skip ci]'
tag: '${{ env.RELEASE_VERSION }} --force'
default_author: github_actions
- name: Create Github release with JReleaser
if: inputs.perform_release
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mvn --batch-mode --no-transfer-progress -DskipTests jreleaser:full-release
- name: Prepare next snapshot
if: inputs.perform_release
run: |
mvn versions:set -DnextSnapshot -DgenerateBackupPoms=false
- name: Next snapshot commit and push
if: inputs.perform_release
uses: EndBug/add-and-commit@v9
with:
message: 'chore(release): prepare next snapshot [skip ci]'
default_author: github_actions
# test_external_amalgamation:
# name: test external amalgamation
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-java@v4
# with:
# distribution: 'temurin'
# java-version: 20
# java-package: jdk
# cache: 'maven'
# - run: brew install sqlite3
# - name: Find SQLite directory
# run: |
# BREW_SQLITE_PREFIX=`brew --prefix sqlite3`
# echo "SQLITE_DIR=$(dirname ${BREW_SQLITE_PREFIX})/$(readlink ${BREW_SQLITE_PREFIX})" | tee -a $GITHUB_ENV
# - name: Make native lib
# run: |
# make native SQLITE_OBJ=${{ env.SQLITE_DIR }}/lib/libsqlite3.dylib SQLITE_HEADER=${{ env.SQLITE_DIR }}/include/sqlite3.h
# - name: Test
# run: mvn --batch-mode --no-transfer-progress test
#
# release:
# name: Deploy
# needs: [ lint, test, test_multiarch, test_external_amalgamation, test_graalvm ]
# if: github.repository_owner == 'xerial' && github.ref == 'refs/heads/master' # only perform on latest master
# runs-on: ubuntu-latest
# steps:
# - name: Print inputs
# run: |
# echo "Perform release: ${{ inputs.perform_release }}"
# - uses: actions/checkout@v4
# if: github.event_name == 'push' || inputs.perform_release != true
# # when performing a release we need the full git history to generate the changelog
# - uses: actions/checkout@v4
# if: inputs.perform_release
# with:
# fetch-depth: 0
# - name: Set up Apache Maven Central
# uses: actions/setup-java@v4
# with: # running setup-java again overwrites the settings.xml
# distribution: 'temurin'
# java-version: '11'
# java-package: jdk
# server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
# server-username: MAVEN_CENTRAL_USERNAME # env variable for username in deploy (1)
# server-password: MAVEN_CENTRAL_PASSWORD # env variable for token in deploy (2)
# - name: Get Project Version
# run: |
# echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" | tee -a $GITHUB_ENV
# - name: Cancel action for non SNAPSHOT push
# if: github.event_name == 'push' && !endsWith(env.PROJECT_VERSION, '-SNAPSHOT')
# uses: andymckay/cancel-action@0.4
# # from that point, if inputs.perform_release is true we perform a release, else we deploy snapshot
# - name: Prepare release
# if: inputs.perform_release
# run: |
# mvn --no-transfer-progress versions:set -DremoveSnapshot -DgenerateBackupPoms=false
# RELEASE_VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout`
# echo "RELEASE_VERSION=${RELEASE_VERSION}" | tee -a $GITHUB_ENV
# sed -i -e "s/^\:project-version\:\ .*/:project-version: ${RELEASE_VERSION}/g" README.adoc
#
# - name: Build
# run: mvn --batch-mode --no-transfer-progress package -P release -DskipTests
#
# # The sonatype maven plugin will decide the right destination depending on whether the project is SNAPSHOT or not
# - name: Publish to Apache Maven Central
# if: github.event_name == 'push' || inputs.push_maven
# run: mvn --batch-mode --no-transfer-progress deploy -P release -DskipTests -Dgpg.signer=bc
# env:
# MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }} # must be the same env variable name as (1)
# MAVEN_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} # must be the same env variable name as (2)
# MAVEN_GPG_KEY: ${{ secrets.GPG_KEY }}
# MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
# - name: Release commit and push
# if: inputs.perform_release
# uses: EndBug/add-and-commit@v9
# with:
# message: 'chore(release): ${{ env.RELEASE_VERSION }} [skip ci]'
# tag: '${{ env.RELEASE_VERSION }} --force'
# default_author: github_actions
# - name: Create Github release with JReleaser
# if: inputs.perform_release
# env:
# JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# mvn --batch-mode --no-transfer-progress -DskipTests jreleaser:full-release
# - name: Prepare next snapshot
# if: inputs.perform_release
# run: |
# mvn versions:set -DnextSnapshot -DgenerateBackupPoms=false
# - name: Next snapshot commit and push
# if: inputs.perform_release
# uses: EndBug/add-and-commit@v9
# with:
# message: 'chore(release): prepare next snapshot [skip ci]'
# default_author: github_actions

0 comments on commit a5df4fc

Please sign in to comment.