github actions update, fresh compiled library #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI with Gradle | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Set up JDK 22' | |
uses: oracle-actions/setup-java@v1 | |
with: | |
website: jdk.java.net | |
release: 22 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build zylquinal/phc-winner-argon2 | |
run: | | |
git clone git@github.com:Zylquinal/phc-winner-argon2.git | |
cd phc-winner-argon2 | |
chmod +x ./build.sh | |
docker run -v ${PWD}:/app ghcr.io/zylquinal/crosscompile-env:master /app/build.sh | |
- name: Copy artifacts | |
run: | | |
mkdir -p src/main/resources | |
mkdir -p src/main/resources/darwin-aarch64 | |
mkdir -p src/main/resources/darwin-x86-64 | |
mkdir -p src/main/resources/linux-aarch64 | |
mkdir -p src/main/resources/linux-x86-64 | |
mkdir -p src/main/resources/windows-aarch64 | |
mkdir -p src/main/resources/windows-x86-64 | |
cp -a phc-winner-argon2/dist/aarch64-apple/libargon2.1.dylib src/main/resources/darwin-aarch64/libargon2.dylib | |
cp -a phc-winner-argon2/dist/x86_64-apple/libargon2.1.dylib src/main/resources/darwin-x86-64/libargon2.dylib | |
cp -a phc-winner-argon2/dist/aarch64-linux/libargon2.so.1 src/main/resources/linux-aarch64/libargon2.so | |
cp -a phc-winner-argon2/dist/x86_64-linux/libargon2.so.1 src/main/resources/linux-x86-64/libargon2.so | |
cp -a phc-winner-argon2/dist/aarch64-windows/argon2.dll src/main/resources/windows-aarch64/argon2.dll | |
cp -a phc-winner-argon2/dist/x86_64-windows/argon2.dll src/main/resources/windows-x86-64/argon2.dll | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: artifact-${{ matrix.os }} | |
path: | | |
build/libs/* | |
build/reports/* |