Skip to content

Commit

Permalink
chore: cleanup and refactor ci into reusable jobs
Browse files Browse the repository at this point in the history
- chore: cleanup file structure for clearer job roles
- chore: remove all direct job hooks in favor of entrypoints
- chore: begin refactoring main build job
- chore: run formatter on `.github/workflows`

Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed Feb 13, 2024
1 parent f19a39a commit 83c358b
Show file tree
Hide file tree
Showing 16 changed files with 431 additions and 243 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "CodeQL"

on:
"on":
workflow_dispatch: {}
workflow_call: {}
push:
Expand Down Expand Up @@ -35,8 +35,8 @@ jobs:
- name: "Setup: GraalVM (Java 21)"
uses: graalvm/setup-graalvm@a1b47fdf04e772fed6b3b46131e226f9aea5e169 # v1
with:
distribution: 'graalvm'
java-version: '21'
distribution: "graalvm"
java-version: "21"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: Initialize CodeQL"
uses: github/codeql-action/init@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: Validate Gradle Wrapper
on:
push:
branches:
- main
pull_request:
branches:
- "*"

"on":
workflow_dispatch: {}
workflow_call: {}

permissions:
contents: read
Expand All @@ -19,7 +16,6 @@ jobs:
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Checkout latest code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
- name: Validate Gradle Wrapper
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: Model

on:
push:
branches:
- main
- stable
pull_request:
types: [labeled, opened, reopened, synchronize]
"on":
workflow_dispatch: {}
workflow_call: {}

permissions:
contents: read
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Qodana
on:

"on":
workflow_dispatch: {}
workflow_call: {}

Expand All @@ -20,7 +21,7 @@ jobs:
- name: "Setup: GraalVM (Java 21)"
uses: graalvm/setup-graalvm@a1b47fdf04e772fed6b3b46131e226f9aea5e169 # v1
with:
distribution: 'graalvm'
distribution: "graalvm"
java-version: 21
check-for-updates: false
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

name: Scorecard supply-chain security
on:
name: Scorecard

"on":
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
branch_protection_rule: {}
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '20 7 * * 2'
push:
branches: ["v3"]
- cron: "20 7 * * 2"
workflow_dispatch: {}
workflow_call: {}

# Declare default permissions as read only.
permissions: read-all
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: Benchmark

on:
push:
branches:
- stable
pull_request:
types: [opened, reopened, synchronize]
"on":
workflow_dispatch: {}
workflow_call: {}

env:
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
Expand Down Expand Up @@ -68,7 +65,7 @@ jobs:
if: ${{ matrix.engine == 'graalvm' }}
with:
components: "native-image,js,wasm"
distribution: 'graalvm'
distribution: "graalvm"
java-version: ${{ matrix.java }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: Zulu"
Expand Down
Loading

0 comments on commit 83c358b

Please sign in to comment.