Skip to content

Commit

Permalink
Kotlin CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ephemient committed Dec 1, 2023
1 parent 26370e6 commit 6d0213a
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 2 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/kt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Kotlin CI

on:
push:
branches: [ main ]
paths: [ kt/** ]
pull_request:
branches: [ main ]
paths: [ kt/** ]

workflow_dispatch:

jobs:
get-inputs:
uses: ephemient/aoc2023/.github/workflows/get-inputs.yml@main
secrets:
SESSION: ${{ secrets.SESSION }}

gradle-wrapper-validation:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: gradle/gradle-build-action@v2
with:
arguments: build distZip
build-root-directory: kt
- uses: actions/upload-artifact@v3
with:
name: aoc2023-exe
path: kt/aoc2023-exe/build/distributions/*.zip
- uses: actions/upload-artifact@v3
with:
name: aoc2023-kexe
path: |
kt/aoc2023-exe/build/bin/*/debugExecutable/*.kexe
kt/aoc2023-exe/build/bin/*/releaseExecutable/*.kexe
run-jvm:
needs: [ get-inputs, build ]
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
with:
name: inputs
path: inputs
- uses: actions/download-artifact@v3
with:
name: aoc2023-exe
- run: unzip aoc2023-exe.zip
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- run: aoc2023-exe/bin/aoc2023-exe
env:
AOC2023_DATADIR: inputs

run-native:
needs: [ get-inputs, build ]
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
with:
name: inputs
path: inputs
- uses: actions/download-artifact@v3
with:
name: aoc2023-kexe
- run: chmod +x linuxX64/*/aoc2023-exe.kexe
- run: linuxX64/releaseExecutable/aoc2023-exe.kexe
env:
AOC2023_DATADIR: inputs
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

Development occurs in language-specific directories:

|[Haskell](hs) ![Haskell CI](https://github.com/ephemient/aoc2023/workflows/Haskell%20CI/badge.svg)|[Kotlin](kt)|
|[Haskell](hs) ![Haskell CI](https://github.com/ephemient/aoc2023/workflows/Haskell%20CI/badge.svg)|[Kotlin](kt) ![Kotlin CI](https://github.com/ephemient/aoc2023/workflows/Kotlin%20CI/badge.svg)|
|--:|--:|
|[Day1.hs](hs/src/Day1.hs)|[Day1.kt](kt/aoc2023-lib/src/commonMain/kotlin/com/github/ephemient/aoc2023/Day1.kt)|
2 changes: 1 addition & 1 deletion kt/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# [Advent of Code 2023](https://adventofcode.com/2023)
### my answers in [Kotlin](https://www.kotlinlang.org/)
### my answers in [Kotlin](https://www.kotlinlang.org/) ![Kotlin CI](https://github.com/ephemient/aoc2023/workflows/Kotlin%20CI/badge.svg)

This project builds with [Gradle](https://gradle.org/).

Expand Down

0 comments on commit 6d0213a

Please sign in to comment.