-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(ci): publish artifacts to Terasology artifactory (#20)
* build(ci): combine workflows into a single one * build(ci): upgrade action dependencies * build: update Terasology artifactory URL --------- Co-authored-by: jdrueckert <jd.rueckert@googlemail.com>
- Loading branch information
1 parent
85b1a57
commit aaa94e2
Showing
5 changed files
with
132 additions
and
112 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,125 @@ | ||
name: Build and Publish for all Platforms | ||
|
||
on: [push] | ||
|
||
jobs: | ||
validate-gradle-wrapper: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v2 | ||
build-linux-windows-amd64: | ||
runs-on: ubuntu-latest | ||
needs: validate-gradle-wrapper | ||
steps: | ||
- name: Install SWIG | ||
run: sudo apt-get install swig mingw-w64 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
- name: Build | ||
run: ./gradlew buildNatives | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: linux-windows-amd64-artifacts | ||
path: | | ||
build/natives/*/*.so | ||
build/natives/*/*.dll | ||
build/natives/*/*.dylib | ||
build-macos-amd64: | ||
runs-on: macos-12 | ||
needs: validate-gradle-wrapper | ||
steps: | ||
- name: Install SWIG and CMake | ||
run: | | ||
brew install swig | ||
brew install cmake | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
- name: Build | ||
run: ./gradlew native_macosx_amd64_clang | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: macosx-amd64-artifacts | ||
path: | | ||
build/natives/*/*.so | ||
build/natives/*/*.dll | ||
build/natives/*/*.dylib | ||
build-macos-aarch64: | ||
runs-on: macos-14 | ||
needs: validate-gradle-wrapper | ||
steps: | ||
- name: Install SWIG and CMake | ||
run: | | ||
brew install swig | ||
brew install cmake | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
- name: Build | ||
run: ./gradlew native_macosx_aarch64_clang | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: macosx-aarch64-artifacts | ||
path: | | ||
build/natives/*/*.so | ||
build/natives/*/*.dll | ||
build/natives/*/*.dylib | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: [validate-gradle-wrapper,build-linux-windows-amd64, build-macos-amd64, build-macos-aarch64] | ||
if: github.ref == 'refs/heads/master' | ||
steps: | ||
- name: Install SWIG | ||
run: sudo apt-get install swig mingw-w64 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
- name: Download all artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: build/natives | ||
merge-multiple: true | ||
- name: Build and Zip Natives | ||
run: ./gradlew build zipNatives | ||
- run: | | ||
ls -R build/natives/ | ||
ls -R build/libs/ | ||
- name: Publish | ||
run: ./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish -PmavenUser=${artifactoryUser} -PmavenPass=${artifactoryPass} | ||
env: | ||
artifactoryUser: ${{ secrets.ARTIFACTORY_USER }} | ||
artifactoryPass: ${{ secrets.ARTIFACTORY_PASS }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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