Skip to content

Commit

Permalink
Fix actions build
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla authored and Spottedleaf committed May 26, 2024
1 parent b31223e commit d03938e
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 10 deletions.
44 changes: 35 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
name: "build"

name: Build
on:
push:
branches: [ "**" ]
tags-ignore: [ "**" ]
pull_request:

jobs:
call-build:
uses: "jpenilla/actions/.github/workflows/shared-ci.yml@master"
with:
artifacts-path: 'build/libs/*.jar'
loom: true
jdk-version: 21
build:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- name: "checkout git repository"
uses: actions/checkout@v4
- name: "validate gradle wrapper"
uses: gradle/actions/wrapper-validation@v3
- name: "setup jdk"
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: "setup gradle"
uses: gradle/actions/setup-gradle@v3
# gradle-build-action doesn't support caching files in the project dir
- name: "cache project local caches"
uses: actions/cache@v4
with:
path: |
.gradle/loom-cache
key: ${{ runner.os }}-project-local-gradle-caches-${{ hashFiles('**/libs.versions.toml', '**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-project-local-gradle-caches-
- name: "setup concurrentutil"
run: ./installConcurrentUtil.sh
- name: "execute gradle build"
run: ./gradlew build
- name: "upload artifacts"
uses: actions/upload-artifact@v4
with:
name: artifacts
path: "build/libs/*.jar"
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ConcurrentUtil"]
path = ConcurrentUtil
url = https://github.com/Spottedleaf/ConcurrentUtil.git
1 change: 1 addition & 0 deletions ConcurrentUtil
Submodule ConcurrentUtil added at 699849
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ base {
}

repositories {
mavenLocal()
mavenLocal {
mavenContent {
includeModule("ca.spottedleaf", "concurrentutil")
}
}
}

dependencies {
Expand Down
6 changes: 6 additions & 0 deletions installConcurrentUtil.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -eou pipefail

git submodule update --init --recursive
cd ConcurrentUtil
mvn install

0 comments on commit d03938e

Please sign in to comment.