-
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
845dd7f
commit f98e2d2
Showing
6 changed files
with
263 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,69 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
name: Build | ||
on: | ||
workflow_call: | ||
secrets: | ||
github-token: | ||
required: true | ||
description: | | ||
The token to use when making authenticated GitHub API calls. | ||
inputs: | ||
build-os: | ||
required: true | ||
type: string | ||
description: | | ||
The operating system to build for. | ||
Valid options are: | ||
* `windows` | ||
* `linux` | ||
* `macos` | ||
outputs: | ||
artifact-id: | ||
description: | | ||
The ID of the artifact generated by this workflow. | ||
value: ${{jobs.build.outputs.artifact-id}} | ||
artifact-name: | ||
description: | | ||
The name of the artifact generated by this workflow. | ||
value: ${{jobs.build.outputs.artifact-name}} | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ${{(inputs.build-os == 'windows' && 'windows-latest') || (inputs.build-os == 'linux' && 'ubuntu-latest') || (inputs.build-os == 'macos' && 'macos-latest') || ''}} | ||
outputs: | ||
artifact-id: ${{steps.upload-artifacts.outputs.artifact-id}} | ||
artifact-name: dist-${{inputs.build-os}} | ||
steps: | ||
- id: install-system-dependencies-linux | ||
name: Install system dependencies (Linux) | ||
if: inputs.build-os == 'linux' | ||
run: sudo apt update && sudo apt install --assume-yes --no-install-recommends libglfw3-dev | ||
- id: install-tasks | ||
name: Install Task | ||
uses: arduino/setup-task@v2 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.github-token || secrets.GITHUB_TOKEN }} | ||
- id: checkout-repository | ||
name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{secrets.github-token || secrets.GITHUB_TOKEN}} | ||
lfs: true | ||
- id: setup-odin | ||
name: Setup Odin | ||
uses: laytan/setup-odin@v2.4.1 | ||
with: | ||
token: ${{secrets.github-token || secrets.GITHUB_TOKEN}} | ||
release: latest | ||
- id: build-distribution | ||
name: Build distribution | ||
run: task dist | ||
- id: upload-artifacts | ||
name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist-${{inputs.build-os}} | ||
path: dist |
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,34 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
name: CodeQL | ||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 12 * * 3' | ||
jobs: | ||
codeql-analyze: | ||
name: CodeQL Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
security-events: write | ||
steps: | ||
- id: checkout-repository | ||
name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
- id: initialize-codeql | ||
name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: csharp | ||
queries: security-and-quality | ||
- id: autobuild | ||
name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
- id: analyze | ||
name: Analyze | ||
uses: github/codeql-action/analyze@v3 |
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,35 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
name: Lint | ||
on: | ||
workflow_call: | ||
secrets: | ||
github-token: | ||
required: true | ||
description: | | ||
The token to use when making authenticated GitHub API calls. | ||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: install-tasks | ||
name: Install Task | ||
uses: arduino/setup-task@v2 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.github-token || secrets.GITHUB_TOKEN }} | ||
- id: checkout-repository | ||
name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{secrets.github-token || secrets.GITHUB_TOKEN}} | ||
lfs: true | ||
- id: setup-odin | ||
name: Setup Odin | ||
uses: laytan/setup-odin@v2.4.1 | ||
with: | ||
token: ${{secrets.github-token || secrets.GITHUB_TOKEN}} | ||
release: latest | ||
- id: lint | ||
name: Lint | ||
run: task lint |
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,40 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
name: Pull Request | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
build-os: | ||
- windows | ||
- linux | ||
- macos | ||
uses: ./.github/workflows/build.yaml | ||
secrets: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
with: | ||
build-os: ${{matrix.build-os}} | ||
test: | ||
name: Test | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
build-os: | ||
- windows | ||
- linux | ||
- macos | ||
uses: ./.github/workflows/test.yaml | ||
secrets: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
with: | ||
build-os: ${{matrix.build-os}} | ||
lint: | ||
name: Lint | ||
uses: ./.github/workflows/lint.yaml | ||
secrets: | ||
github-token: ${{secrets.GITHUB_TOKEN}} |
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,38 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
name: Push | ||
on: | ||
push: | ||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
build-os: | ||
- windows | ||
- linux | ||
- macos | ||
uses: ./.github/workflows/build.yaml | ||
secrets: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
with: | ||
build-os: ${{matrix.build-os}} | ||
test: | ||
name: Test | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
build-os: | ||
- windows | ||
- linux | ||
- macos | ||
uses: ./.github/workflows/test.yaml | ||
secrets: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
with: | ||
build-os: ${{matrix.build-os}} | ||
lint: | ||
name: Lint | ||
uses: ./.github/workflows/lint.yaml | ||
secrets: | ||
github-token: ${{secrets.GITHUB_TOKEN}} |
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,47 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
name: Test | ||
on: | ||
workflow_call: | ||
secrets: | ||
github-token: | ||
required: true | ||
description: | | ||
The token to use when making authenticated GitHub API calls. | ||
inputs: | ||
build-os: | ||
required: true | ||
type: string | ||
description: | | ||
The operating system to build for. | ||
Valid options are: | ||
* `windows` | ||
* `linux` | ||
* `macos` | ||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ${{(inputs.build-os == 'windows' && 'windows-latest') || (inputs.build-os == 'linux' && 'ubuntu-latest') || (inputs.build-os == 'macos' && 'macos-latest') || ''}} | ||
steps: | ||
- id: install-tasks | ||
name: Install Task | ||
uses: arduino/setup-task@v2 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.github-token || secrets.GITHUB_TOKEN }} | ||
- id: checkout-repository | ||
name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{secrets.github-token || secrets.GITHUB_TOKEN}} | ||
lfs: true | ||
- id: setup-odin | ||
name: Setup Odin | ||
uses: laytan/setup-odin@v2.4.1 | ||
with: | ||
token: ${{secrets.github-token || secrets.GITHUB_TOKEN}} | ||
release: latest | ||
- id: test | ||
name: Test | ||
run: task test |