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 8d1b0db
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 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.exe

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

steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void validFeed() throws Exception {
Assertions.assertEquals(MediaType.APPLICATION_ATOM_XML.toString(), result.getContentType());
Assertions.assertEquals("123456", result.getLastModifiedSince());
Assertions.assertEquals("78910", result.getETag());
Assertions.assertTrue(result.getDuration() > 0);
Assertions.assertTrue(result.getDuration() >= 0);
Assertions.assertEquals(this.feedUrl, result.getUrlAfterRedirect());
}

Expand Down

0 comments on commit 8d1b0db

Please sign in to comment.