Skip to content

Commit

Permalink
add windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Athou committed Aug 12, 2024
1 parent fa5776c commit 236e8d2
Showing 1 changed file with 43 additions and 6 deletions.
49 changes: 43 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: ci

on: [ push ]

env:
JAVA_VERSION: 21

jobs:
build:
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
database: [ "h2", "postgresql", "mysql", "mariadb" ]

steps:
# Checkout
- name: Configure git to checkout as-is
run: git config --global core.autocrlf false

- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: "21"
java-version: ${{ env.JAVA_VERSION }}
distribution: "graalvm"
cache: "maven"

Expand Down Expand Up @@ -120,9 +120,46 @@ jobs:
images: athou/commafeed:master-native,athou/commafeed:master-jvm
push: true

build-windows:
runs-on: windows-latest
strategy:
matrix:
database: [ "h2", "postgresql", "mysql", "mariadb" ]

steps:
# Checkout
- name: Configure git to checkout as-is
run: git config --global core.autocrlf false

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

# Setup
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "graalvm"
cache: "maven"

# Build & Test
- name: Build with Maven
run: mvn --batch-mode --no-transfer-progress install -Pnative -P${{ matrix.database }} -DskipTests=${{ matrix.database != 'h2' }}

# Upload artifacts
- name: Upload native executable
uses: actions/upload-artifact@v4
with:
name: commafeed-${{ matrix.database }}-${{ runner.os }}-${{ runner.arch }}
path: commafeed-server/target/commafeed-*-runner

release:
runs-on: ubuntu-latest
needs: build
needs:
- build-linux
- build-windows
if: github.ref_type == 'tag'

steps:
Expand Down

0 comments on commit 236e8d2

Please sign in to comment.