-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Rewrite all actions and add release action (#33)
- Loading branch information
Showing
18 changed files
with
293 additions
and
471 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 @@ | ||
rustflags = "-Z wasi-exec-model=reactor" |
File renamed without changes.
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,80 @@ | ||
name: Build & Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build-and-test: | ||
name: Build & Test | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust Toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: nightly | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: "21" | ||
|
||
- name: Cache Cargo registry | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cargo-registry- | ||
- name: Cache Cargo build | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
target | ||
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cargo-build- | ||
- name: Cache Gradle Dependencies | ||
id: cache-gradle | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/gradle-wrapper.jar') }} | ||
restore-keys: | | ||
gradle-${{ runner.os }}- | ||
- name: Install Protobuf Compiler | ||
run: sudo apt update && sudo apt install protobuf-compiler -y | ||
|
||
- name: Run Clippy | ||
run: cargo clippy --all-targets --all-features -- -D warnings | ||
|
||
- name: Build Projects | ||
run: cargo build --all --all-features --verbose | ||
env: | ||
CURRENT_COMMIT: ${{ github.sha }} | ||
CURRENT_BUILD: ${{ github.run_number }} | ||
|
||
- name: Run Tests | ||
run: cargo test --workspace --exclude pterodactyl --all-features --verbose | ||
|
||
- name: Build & Test JVM Client | ||
working-directory: clients/jvm | ||
run: | | ||
chmod +x gradlew | ||
./gradlew build --no-daemon | ||
env: | ||
CURRENT_COMMIT: ${{ github.sha }} | ||
CURRENT_BUILD: ${{ github.run_number }} |
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,60 @@ | ||
name: Docker | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push: | ||
name: Build & Push | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Docker Metadata | ||
id: docker-meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
flavor: | | ||
latest=false | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false }} | ||
type=ref,event=tag | ||
type=ref,event=branch | ||
- name: Setup QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build & Push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
platforms: linux/amd64,linux/arm64,linux/riscv64 | ||
build-args: | | ||
CURRENT_COMMIT=${{ github.sha }} | ||
CURRENT_BUILD=${{ github.run_number }} | ||
labels: ${{ steps.docker-meta.outputs.labels }} | ||
tags: ${{ steps.docker-meta.outputs.tags }} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.