ci: test cross compile #2
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: Publish snapshot | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
COURSIER_REPOSITORIES: central|https://s01.oss.sonatype.org/content/repositories/snapshots|jitpack|https://corporate.com/repo | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
jobs: | |
cross: | |
strategy: | |
matrix: | |
# a list of all the targets | |
include: | |
- TARGET: x86_64-pc-windows-msvc | |
OS: windows-latest | |
- TARGET: x86_64-apple-darwin | |
OS: macos-latest | |
- TARGET: aarch64-apple-darwin | |
OS: macos-latest | |
runs-on: ${{ matrix.OS }} | |
env: | |
NAME: rust cross compile | |
TARGET: ${{ matrix.TARGET }} | |
OS: ${{ matrix.OS }} | |
MILL_RUST_TARGET: ${{ matrix.TARGET }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{ matrix.TARGET }} | |
override: true | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
- run: chmod +x millw | |
- run: ./millw fastbloomjvm.compileNative | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: result | |
path: out/fastbloomjvm/compileNative.dest/native/ | |
deploy: | |
needs: cross | |
runs-on: ubuntu-22.04 | |
env: | |
MILL_RUST_TARGET: x86_64-unknown-linux-gnu | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: x86_64-unknown-linux-gnu | |
override: true | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
- run: chmod +x millw | |
- run: ./millw fastbloomjvm.compileNative | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: result | |
path: out/fastbloomjvm/compileNative.dest/native/ | |
- run: ./millw fastbloomjvm.jar |