aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-08-11 13:22:24 +0200
committerGitHub <noreply@github.com>2024-08-11 13:22:24 +0200
commit8903d9fa783455558d20eb32a2038c87ab5913be (patch)
tree2c925d0ecf625f8e8a5505960d0d51d2201e88e2 /.github/workflows
parenta8d4861b051298cc8a1db3c5210a32abab866b1e (diff)
downloadskyhanni-8903d9fa783455558d20eb32a2038c87ab5913be.tar.gz
skyhanni-8903d9fa783455558d20eb32a2038c87ab5913be.tar.bz2
skyhanni-8903d9fa783455558d20eb32a2038c87ab5913be.zip
Add multi version preprocessor (#2283)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml97
-rw-r--r--.github/workflows/generate-constants.yaml6
2 files changed, 61 insertions, 42 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 379f842d8..8275ac8b0 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,44 +1,63 @@
name: Build
on:
- push:
- branches:
- - "*"
- paths-ignore:
- - ".gitignore"
- pull_request:
- branches:
- - "*"
- paths-ignore:
- - ".gitignore"
- workflow_dispatch:
+ push:
+ branches:
+ - "*"
+ paths-ignore:
+ - ".gitignore"
+ pull_request:
+ branches:
+ - "*"
+ paths-ignore:
+ - ".gitignore"
+ workflow_dispatch:
permissions: write-all
jobs:
- build:
- runs-on: ubuntu-latest
- name: "Build and test"
- steps:
- - uses: actions/checkout@v3
- - name: Set up JDK 17
- uses: actions/setup-java@v3
- with:
- java-version: 17
- distribution: temurin
- cache: gradle
- - name: Setup gradle
- uses: gradle/gradle-build-action@v2
- - name: Build with Gradle
- run: ./gradlew build -x test --stacktrace
- - uses: actions/upload-artifact@v3
- name: Upload development build
- with:
- name: "Development Build"
- path: build/libs/*.jar
- - name: Test with Gradle
- run: ./gradlew test
- - uses: actions/upload-artifact@v3
- name: "Upload test report"
- if: ${{ !cancelled() }}
- with:
- name: "Test Results"
- path: build/reports/tests/test/
+ build:
+ runs-on: ubuntu-latest
+ name: "Build and test"
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up JDK 21
+ uses: actions/setup-java@v3
+ with:
+ java-version: 21
+ distribution: temurin
+ cache: gradle
+ - name: Setup gradle
+ uses: gradle/gradle-build-action@v2
+ - name: Build with Gradle
+ run: ./gradlew assemble -x test --stacktrace
+ - uses: actions/upload-artifact@v3
+ name: Upload development build
+ with:
+ name: "Development Build"
+ path: versions/1.8.9/build/libs/*.jar
+ - name: Test with Gradle
+ run: ./gradlew test
+ - uses: actions/upload-artifact@v3
+ name: "Upload test report"
+ if: ${{ !cancelled() }}
+ with:
+ name: "Test Results"
+ path: versions/1.8.9/build/reports/tests/test/
+ preprocess:
+ runs-on: ubuntu-latest
+ name: "Build multi version"
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up JDK 21
+ uses: actions/setup-java@v3
+ with:
+ java-version: 21
+ distribution: temurin
+ cache: gradle
+ - name: Setup gradle
+ uses: gradle/gradle-build-action@v2
+ - name: Enable preprocessor
+ run: |
+ mkdir -p .gradle
+ echo skyhanni.multi-version=preprocess-only > .gradle/private.properties
+ - name: Build with Gradle
+ run: ./gradlew build --stacktrace
diff --git a/.github/workflows/generate-constants.yaml b/.github/workflows/generate-constants.yaml
index 505a035b2..c589676d0 100644
--- a/.github/workflows/generate-constants.yaml
+++ b/.github/workflows/generate-constants.yaml
@@ -18,10 +18,10 @@ jobs:
name: "Generate regexes"
steps:
- uses: actions/checkout@v3
- - name: Set up JDK 17
+ - name: Set up JDK 21
uses: actions/setup-java@v3
with:
- java-version: 17
+ java-version: 21
distribution: temurin
cache: gradle
- name: Setup gradle
@@ -33,7 +33,7 @@ jobs:
name: Upload generated repo regexes
with:
name: Repo Regexes
- path: build/regexes/constants.json
+ path: versions/1.8.9/build/regexes/constants.json
publish-regexes:
runs-on: ubuntu-latest
needs: regexes