forked from Archives/Athou_commafeed
add windows builds
This commit is contained in:
49
.github/workflows/ci.yml
vendored
49
.github/workflows/ci.yml
vendored
@@ -2,8 +2,11 @@ name: ci
|
|||||||
|
|
||||||
on: [ push ]
|
on: [ push ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: 21
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -11,9 +14,6 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout
|
# Checkout
|
||||||
- name: Configure git to checkout as-is
|
|
||||||
run: git config --global core.autocrlf false
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
- name: Set up GraalVM
|
- name: Set up GraalVM
|
||||||
uses: graalvm/setup-graalvm@v1
|
uses: graalvm/setup-graalvm@v1
|
||||||
with:
|
with:
|
||||||
java-version: "21"
|
java-version: ${{ env.JAVA_VERSION }}
|
||||||
distribution: "graalvm"
|
distribution: "graalvm"
|
||||||
cache: "maven"
|
cache: "maven"
|
||||||
|
|
||||||
@@ -120,9 +120,46 @@ jobs:
|
|||||||
images: athou/commafeed:master-native,athou/commafeed:master-jvm
|
images: athou/commafeed:master-native,athou/commafeed:master-jvm
|
||||||
push: true
|
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:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs:
|
||||||
|
- build-linux
|
||||||
|
- build-windows
|
||||||
if: github.ref_type == 'tag'
|
if: github.ref_type == 'tag'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class HttpGetterTest {
|
|||||||
Assertions.assertEquals(MediaType.APPLICATION_ATOM_XML.toString(), result.getContentType());
|
Assertions.assertEquals(MediaType.APPLICATION_ATOM_XML.toString(), result.getContentType());
|
||||||
Assertions.assertEquals("123456", result.getLastModifiedSince());
|
Assertions.assertEquals("123456", result.getLastModifiedSince());
|
||||||
Assertions.assertEquals("78910", result.getETag());
|
Assertions.assertEquals("78910", result.getETag());
|
||||||
Assertions.assertTrue(result.getDuration() > 0);
|
Assertions.assertTrue(result.getDuration() >= 0);
|
||||||
Assertions.assertEquals(this.feedUrl, result.getUrlAfterRedirect());
|
Assertions.assertEquals(this.feedUrl, result.getUrlAfterRedirect());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user