-
-
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.
- Loading branch information
1 parent
8475111
commit cbdd286
Showing
2 changed files
with
244 additions
and
0 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,108 @@ | ||
# ==-----------------------------------------------------------== # | ||
# SPDX-FileCopyrightText: © 2025 Nayan Patil <nayantsg@proton.me> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# ==-----------------------------------------------------------== # | ||
|
||
# Do not modify! | ||
# This file was generated from a template using the necronux internal pkl package. | ||
# Any changes should be made to the template, not this file. | ||
|
||
name: CI-Pkl | ||
'on': | ||
pull_request: | ||
branches: | ||
- develop | ||
- stable | ||
- release | ||
- hotfix | ||
paths: | ||
- '*.pkl' | ||
- '**/*.pkl' | ||
- stdlib/** | ||
- tools/** | ||
- '*.kts' | ||
- '**/*.kts' | ||
- gradle/** | ||
- gradlew | ||
- gradlew.bat | ||
- justfile | ||
push: | ||
paths: | ||
- '*.pkl' | ||
- '**/*.pkl' | ||
- stdlib/** | ||
- tools/** | ||
- '*.kts' | ||
- '**/*.kts' | ||
- gradle/** | ||
- gradlew | ||
- gradlew.bat | ||
- justfile | ||
workflow_dispatch: {} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
jobs: | ||
conclusion: | ||
if: ${{ !cancelled() }} | ||
needs: | ||
- resolvecheck | ||
- evalcheck | ||
- test | ||
permissions: | ||
contents: none | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Conclusion | ||
shell: bash | ||
run: |- | ||
jq -C <<< '${{ toJson(needs) }}' | ||
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' | ||
resolvecheck: | ||
name: Resolve Check | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install just | ||
uses: taiki-e/install-action@just | ||
- name: Check if necronux stdlib pkl project can be resolved | ||
shell: bash | ||
run: just resolve-stdlibpkl | ||
- name: Check if necronux internal pkl projects can be resolved | ||
shell: bash | ||
run: just resolve-internalpkl | ||
evalcheck: | ||
name: Eval Check | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install just | ||
uses: taiki-e/install-action@just | ||
- name: Check if necronux stdlib pkl modules can be evaluated | ||
shell: bash | ||
run: just eval-stdlibpkl | ||
- name: Check if necronux internal pkl modules can be evaluated | ||
shell: bash | ||
run: just eval-internalpkl | ||
- name: Verify necronux internal pkl modules evaluation reflects the latest changes | ||
shell: bash | ||
run: git diff --exit-code | ||
test: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install just | ||
uses: taiki-e/install-action@just | ||
- name: Test necronux stdlib pkl modules | ||
shell: bash | ||
run: just test-stdlibpkl |
136 changes: 136 additions & 0 deletions
136
tools/necronux.internal.pkl.gpl/internal/.github/workflows/ci-pkl.pkl
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,136 @@ | ||
// ==-----------------------------------------------------------== // | ||
// SPDX-FileCopyrightText: © 2025 Nayan Patil <nayantsg@proton.me> | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
// ==-----------------------------------------------------------== // | ||
|
||
@ModuleInfo { minPklVersion = "0.27.0" } | ||
|
||
amends "../../../../commons/GitHubAction.pkl" | ||
|
||
import "commons/commonJobs.pkl" as commonJobs | ||
import "commons/commonSteps.pkl" as commonSteps | ||
|
||
headercomment = """ | ||
# ==-----------------------------------------------------------== # | ||
# SPDX-FileCopyrightText: © 2025 Nayan Patil <nayantsg@proton.me> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# ==-----------------------------------------------------------== # | ||
""" | ||
|
||
name = "CI-Pkl" | ||
|
||
on { | ||
pull_request { | ||
branches { | ||
"develop" | ||
"stable" | ||
"release" | ||
"hotfix" | ||
} | ||
paths { | ||
"*.pkl" | ||
"**/*.pkl" | ||
"stdlib/**" | ||
"tools/**" | ||
"*.kts" | ||
"**/*.kts" | ||
"gradle/**" | ||
"gradlew" | ||
"gradlew.bat" | ||
"justfile" | ||
} | ||
} | ||
push { | ||
paths = (on.pull_request.paths) {} | ||
} | ||
workflow_dispatch {} | ||
} | ||
|
||
concurrency { | ||
group = "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | ||
`cancel-in-progress` = true | ||
} | ||
|
||
permissions { | ||
contents = "read" | ||
} | ||
|
||
jobs { | ||
["conclusion"] = (commonJobs.jobs["conclusion-push"]) { | ||
`if` = "${{ !cancelled() }}" | ||
needs { | ||
"resolvecheck" | ||
"evalcheck" | ||
"test" | ||
} | ||
} | ||
|
||
["resolvecheck"] { | ||
name = "Resolve Check" | ||
`runs-on` = "ubuntu-latest" | ||
`timeout-minutes` = 30 | ||
steps { | ||
(commonSteps.jobs["checkoutStep"].steps[0]) {} | ||
new { | ||
name = "Install just" | ||
uses = "taiki-e/install-action@just" | ||
} | ||
new { | ||
name = "Check if necronux stdlib pkl project can be resolved" | ||
run = "just resolve-stdlibpkl" | ||
shell = "bash" | ||
} | ||
new { | ||
name = "Check if necronux internal pkl projects can be resolved" | ||
run = "just resolve-internalpkl" | ||
shell = "bash" | ||
} | ||
} | ||
} | ||
["evalcheck"] { | ||
name = "Eval Check" | ||
`runs-on` = "ubuntu-latest" | ||
`timeout-minutes` = 30 | ||
steps { | ||
(commonSteps.jobs["checkoutStep"].steps[0]) {} | ||
new { | ||
name = "Install just" | ||
uses = "taiki-e/install-action@just" | ||
} | ||
new { | ||
name = "Check if necronux stdlib pkl modules can be evaluated" | ||
run = "just eval-stdlibpkl" | ||
shell = "bash" | ||
} | ||
new { | ||
name = "Check if necronux internal pkl modules can be evaluated" | ||
run = "just eval-internalpkl" | ||
shell = "bash" | ||
} | ||
new { | ||
name = "Verify necronux internal pkl modules evaluation reflects the latest changes" | ||
run = "git diff --exit-code" | ||
shell = "bash" | ||
} | ||
} | ||
} | ||
["test"] { | ||
name = "Tests" | ||
`runs-on` = "ubuntu-latest" | ||
`timeout-minutes` = 30 | ||
steps { | ||
(commonSteps.jobs["checkoutStep"].steps[0]) {} | ||
new { | ||
name = "Install just" | ||
uses = "taiki-e/install-action@just" | ||
} | ||
new { | ||
name = "Test necronux stdlib pkl modules" | ||
run = "just test-stdlibpkl" | ||
shell = "bash" | ||
} | ||
} | ||
} | ||
} |