Skip to content

Commit

Permalink
ci for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
psuzn committed May 11, 2024
1 parent 66f3fed commit 2731d08
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build Linux

on:
workflow_call:
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3g"

steps:
- uses: actions/checkout@v4

- name: JDK setup
uses: actions/setup-java@v4
with:
java-version: |
11
17
distribution: corretto

- name: Cache
uses: actions/cache@v4
with:
path: |
./build
./.gradle
~/.gradle/caches
~/.gradle/wrapper
~/.m2/repository
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Tests
run: ./gradlew allTest --parallel --no-daemon --stacktrace

- name: Build Artifacts
run: ./gradlew publishToMavenLocal

3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ jobs:
name: Build macOS
uses: ./.github/workflows/build-macos.yml

build-windows:
name: Build Windows
uses: ./.github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal fun hostOs(osName: String, archName: String, version: String): Platform
return when (hostOs(osName)) {
DesktopOs.Macos -> Platform.OS.MacOs(arch, version)
DesktopOs.Linux -> Platform.OS.Linux(arch, version)
DesktopOs.Windows -> Platform.OS.Linux(arch, version)
DesktopOs.Windows -> Platform.OS.Windows(arch, version)
DesktopOs.Unknown -> Platform.OS.Unknown(arch, version)
}
}

0 comments on commit 2731d08

Please sign in to comment.