mirror of
https://github.com/floci-io/floci-cli.git
synced 2026-11-22 21:50:47 -05:00
172 lines
4.1 KiB
YAML
172 lines
4.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'src/**'
|
|
- 'pom.xml'
|
|
- '.github/workflows/ci.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'src/**'
|
|
- 'pom.xml'
|
|
- '.github/workflows/ci.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: Build and Test (JVM)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '25'
|
|
distribution: 'temurin'
|
|
cache: maven
|
|
|
|
- name: Run unit tests
|
|
run: mvn test -B
|
|
|
|
native-linux-amd64:
|
|
name: Native image — linux/amd64
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: graalvm/setup-graalvm@v1
|
|
with:
|
|
java-version: '24'
|
|
distribution: 'graalvm-community'
|
|
cache: maven
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build native binary
|
|
run: mvn clean package -Pnative -DskipTests -B
|
|
|
|
- name: Smoke test — version
|
|
run: ./target/floci version
|
|
|
|
- name: Smoke test — doctor
|
|
run: ./target/floci doctor || true # non-zero is ok in CI (docker may not be running)
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: floci-linux-amd64
|
|
path: target/floci
|
|
retention-days: 7
|
|
|
|
native-linux-arm64:
|
|
name: Native image — linux/arm64
|
|
runs-on: ubuntu-24.04-arm
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: graalvm/setup-graalvm@v1
|
|
with:
|
|
java-version: '24'
|
|
distribution: 'graalvm-community'
|
|
cache: maven
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build native binary
|
|
run: mvn clean package -Pnative -DskipTests -B
|
|
|
|
- name: Smoke test — version
|
|
run: ./target/floci version
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: floci-linux-arm64
|
|
path: target/floci
|
|
retention-days: 7
|
|
|
|
native-macos-amd64:
|
|
name: Native image — macos/amd64
|
|
runs-on: macos-13
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: graalvm/setup-graalvm@v1
|
|
with:
|
|
java-version: '24'
|
|
distribution: 'graalvm-community'
|
|
cache: maven
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build native binary
|
|
run: mvn clean package -Pnative -DskipTests -B
|
|
|
|
- name: Smoke test — version
|
|
run: ./target/floci version
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: floci-darwin-amd64
|
|
path: target/floci
|
|
retention-days: 7
|
|
|
|
native-macos-arm64:
|
|
name: Native image — macos/arm64
|
|
runs-on: macos-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: graalvm/setup-graalvm@v1
|
|
with:
|
|
java-version: '24'
|
|
distribution: 'graalvm-community'
|
|
cache: maven
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build native binary
|
|
run: mvn clean package -Pnative -DskipTests -B
|
|
|
|
- name: Smoke test — version
|
|
run: ./target/floci version
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: floci-darwin-arm64
|
|
path: target/floci
|
|
retention-days: 7
|
|
|
|
native-windows-amd64:
|
|
name: Native image — windows/amd64
|
|
runs-on: windows-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: graalvm/setup-graalvm@v1
|
|
with:
|
|
java-version: '24'
|
|
distribution: 'graalvm-community'
|
|
cache: maven
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build native binary
|
|
run: mvn clean package -Pnative -DskipTests -B
|
|
|
|
- name: Smoke test — version
|
|
run: target\floci.exe version
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: floci-windows-amd64
|
|
path: target/floci.exe
|
|
retention-days: 7
|