-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from TeamKun/develop
Develop
- Loading branch information
Showing
554 changed files
with
25,097 additions
and
22,281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: Build NMS with NMSAction | ||
on: | ||
workflow_call: | ||
secrets: | ||
token: | ||
required: true | ||
|
||
jobs: | ||
check-whether-has-to-build: | ||
name: Check whether has to build | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-hit: ${{ steps.check.outputs.cache-hit }} | ||
steps: | ||
- name: Check whether has to build | ||
id: check | ||
uses: actions/cache@v4 | ||
with: | ||
lookup-only: true | ||
path: nms-build/.m2 | ||
key: scenamatica-nms | ||
restore-keys: scenamatica-nms | ||
build-nms: | ||
name: Build NMS with NMSAction | ||
needs: check-whether-has-to-build | ||
if: needs.check-whether-has-to-build.outputs.cache-hit != 'true' | ||
strategy: | ||
matrix: | ||
nms-version: | ||
- 1.16.5 | ||
- 1.16.3 | ||
- 1.15.2 | ||
- 1.14.4 | ||
- 1.13.2 | ||
- "1.13" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build NMS if cache miss | ||
uses: PeyaPeyaPeyang/nmsaction@v9 | ||
with: | ||
rev: ${{ matrix.nms-version }} | ||
- name: Cache NMS | ||
uses: actions/cache@v4 | ||
with: | ||
path: nms-build/.m2 | ||
key: nms-maven-${{ matrix.nms-version }} | ||
collect-to-one-artifact: | ||
name: Collect to one artifact | ||
runs-on: ubuntu-latest | ||
needs: build-nms | ||
if: needs.check-whether-has-to-build.outputs.cache-hit != 'true' | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
- run: npm install @actions/cache @actions/github | ||
- uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const cache = require('@actions/cache'); | ||
const gh = require('@actions/github'); | ||
const path = require('path'); | ||
const nmsVersions = [ | ||
'1.16.5', | ||
'1.16.3', | ||
'1.15.2', | ||
'1.14.4', | ||
'1.13.2', | ||
'1.13' | ||
]; | ||
const octokit = gh.getOctokit(process.env.GITHUB_TOKEN); | ||
for (const nmsVersion of nmsVersions) { | ||
const key = `nms-maven-${nmsVersion}`; | ||
const cacheKey = await cache.restoreCache( | ||
['nms-build/.m2'], | ||
key, | ||
nmsVersions | ||
); | ||
if (cacheKey) { | ||
console.log(`Cache restored from key: ${cacheKey}`); | ||
} else { | ||
console.error(`Cache not found for key: ${key}`); | ||
process.exit(1); | ||
} | ||
} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Save caches | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: nms-build/.m2 | ||
key: nms-maven |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build NMS with NMSAction | ||
on: | ||
workflow_call: | ||
secrets: | ||
token: | ||
required: true | ||
|
||
jobs: | ||
build: | ||
name: Build with Maven | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Change directory to scenamatica | ||
run: cd Scenamatica | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v4 | ||
id: maven-cache | ||
with: | ||
java-version: 8 | ||
distribution: zulu | ||
cache: maven | ||
- name: Set up Maven | ||
uses: stCarolas/setup-maven@v5 | ||
with: | ||
maven-version: 3.8.2 | ||
- name: Restore NMS cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: nms-build/.m2 | ||
key: scenamatica-nms | ||
restore-keys: scenamatica-nms | ||
- name: Deploy NMS cache | ||
if: steps.maven-cache.outputs.cache-hit != 'true' | ||
run: | | ||
mv -f nms-build/.m2/repository/repository $HOME/.m2/ -v | ||
- name: Build with Maven | ||
run: | | ||
./Scenamatica/build -D"jar.finalName=Scenamatica" -P debug | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: scenamatica | ||
path: Scenamatica/ScenamaticaPlugin/target/Scenamatica.jar | ||
retention-days: 1 | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.