Skip to content

Commit

Permalink
fix: GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
ishland committed Oct 31, 2024
1 parent 47103dc commit 619934f
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 9 deletions.
43 changes: 34 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,55 @@
name: build
on: [pull_request, push]
name: C2ME Test

on:
push: {}
pull_request: {}

jobs:
build:
test:
runs-on: ubuntu-22.04
steps:
- name: checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: setup jdk 21
uses: actions/setup-java@v4

- name: Set up JDK 23
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 23
java-package: jdk

- name: Install LLVM
uses: KyleMayes/install-llvm-action@v2
with:
java-version: 21
distribution: 'microsoft'
version: "18.1.8"

- name: Install required dependencies
run: sudo apt update && sudo apt install libtinfo5

- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
./.gradle/loom-cache
key: ${{ runner.os }}-gradle4-test-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle4-test-
- name: setup project
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
./build.sh up
./build.sh patch
- name: build
run: |
cd C2ME-fabric-patched
./gradlew clean build
- name: capture build artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: C2ME Test

on:
push: {}
pull_request: {}

jobs:
test:
runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
testTask: [runTestC2MEServer]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Set up JDK 23
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 23
java-package: jdk

- name: Install LLVM
uses: KyleMayes/install-llvm-action@v2
with:
version: "18.1.8"

- name: Install required dependencies
run: sudo apt update && sudo apt install libtinfo5

- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
./.gradle/loom-cache
key: ${{ runner.os }}-gradle4-test-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle4-test-
- name: setup project
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
./build.sh up
./build.sh patch
- name: Test C2ME
run: |
cd C2ME-fabric-patched
./gradlew clean ${{ matrix.testTask }}

0 comments on commit 619934f

Please sign in to comment.