Skip to content

chore(ci): migrate workflows to blacksmith #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/flex-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ name: Flex Build
jobs:
build: # TODO: add build attestation and generate then combine gradle dependency graphs for SBOM
name: Build ${{ inputs.dir }}/${{ inputs.mc }}
runs-on: ubuntu-22.04
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -45,21 +45,21 @@ jobs:

- name: Cache build
id: cache
uses: actions/cache@v4
uses: useblacksmith/cache@v5
with:
path: ${{ inputs.dir }}/build
key: build-${{ hashFiles(format('{0}/[a-z]**', inputs.dir), 'api/**') }}

- if: steps.cache.outputs.cache-hit != 'true'
name: Setup Java
uses: actions/setup-java@v4
uses: useblacksmith/setup-java@v5
with:
distribution: temurin
java-version: ${{ inputs.java }}

- if: steps.cache.outputs.cache-hit != 'true'
name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: useblacksmith/setup-gradle/setup-gradle@v5
with:
workflow-job-context: '{}' # FIXME: avoid this cache duplication workaround

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/lifecycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ concurrency: # FIXME: prevent release commit cancellation
jobs:
release-please:
name: Release Please
runs-on: ubuntu-22.04
runs-on: blacksmith-2vcpu-ubuntu-2204
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
tag_name: ${{ steps.release-please.outputs.tag_name }}
Expand All @@ -49,7 +49,7 @@ jobs:
if: github.event.action != 'closed'
name: Construct matrices
needs: release-please
runs-on: ubuntu-22.04
runs-on: blacksmith-2vcpu-ubuntu-2204
outputs:
build-matrix: ${{ steps.matrices.outputs.build-matrix }}
run-matrix: ${{ steps.matrices.outputs.run-matrix }}
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
needs:
- matrices
- build
runs-on: ubuntu-22.04
runs-on: blacksmith-2vcpu-ubuntu-2204
strategy:
fail-fast: false
matrix:
Expand All @@ -243,7 +243,7 @@ jobs:
cp mc-runtime-test-*-${{ matrix.version.type }}-release.jar run/mods

- name: Setup Java temurin-${{ matrix.version.java }}
uses: actions/setup-java@v4
uses: useblacksmith/setup-java@v5
with:
java-version: ${{ matrix.version.java }}
distribution: temurin
Expand All @@ -268,7 +268,7 @@ jobs:
name: Release
permissions:
contents: write
runs-on: ubuntu-22.04
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -296,7 +296,7 @@ jobs:
needs:
- run
- release
runs-on: ubuntu-22.04
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- name: Delete artifacts
uses: geekyeggo/delete-artifact@v5.1.0
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-gametests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs: # TODO: add cleanup job
merge: # TODO: simplify away this job
name: Merge
needs: [build]
runs-on: ubuntu-latest
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v4
Expand All @@ -39,7 +39,7 @@ jobs: # TODO: add cleanup job
- { mc: 1.20.4, type: lexforge, modloader: forge, regex: .*forge.*, java: 17 }
- { mc: 1.20.4, type: neoforge, modloader: neoforge, regex: .*neoforge.*, java: 17 }
- { mc: 1.20.4, type: fabric, modloader: fabric, regex: .*fabric.*, java: 17 }
runs-on: ubuntu-22.04
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand All @@ -51,7 +51,7 @@ jobs: # TODO: add cleanup job
cp merged-artifacts/mc-runtime-test-${{ matrix.mc }}-*-${{ matrix.type }}-release.jar run/mods

- name: Setup temurin-${{ matrix.java }}
uses: actions/setup-java@v4
uses: useblacksmith/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: temurin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-local-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ env:
jobs:
run:
name: Run test
runs-on: ubuntu-22.04
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -50,7 +50,7 @@ jobs:
ref: ${{ github.event.inputs.ref }}

- name: Setup temurin-${{ env.java_version }}
uses: actions/setup-java@v4
uses: useblacksmith/setup-java@v5
with:
java-version: ${{ env.java_version }}
distribution: temurin
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Java
uses: actions/setup-java@v4
uses: useblacksmith/setup-java@v5
with:
java-version: ${{ env.java_version }}
distribution: "temurin"
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ runs:

- if: inputs.cache-mc == 'true'
name: Cache Minecraft
uses: actions/cache@v4
uses: useblacksmith/cache@v5
with:
path: /home/runner/.minecraft
key: hmc-${{ inputs.modloader }}-${{ inputs.mc }}
Expand Down