-
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.
Merge pull request #1 from glektarssza/feature/setup
[Chore] Setup repository
- Loading branch information
Showing
15 changed files
with
789 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,12 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json | ||
version: 2 | ||
updates: | ||
- directory: / | ||
package-ecosystem: github-actions | ||
labels: | ||
- Dependency | ||
schedule: | ||
interval: weekly | ||
day: wednesday | ||
time: "12:00" | ||
timezone: Canada/Mountain |
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,65 @@ | ||
# 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-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.5.2 | ||
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,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.5.2 | ||
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.5.2 | ||
with: | ||
token: ${{secrets.github-token || secrets.GITHUB_TOKEN}} | ||
release: latest | ||
- id: test | ||
name: Test | ||
run: task test |
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 |
---|---|---|
|
@@ -36,3 +36,12 @@ tags | |
|
||
# Environment # | ||
.envrc | ||
|
||
# Odin Language Server # | ||
ols.json | ||
|
||
# Artifacts # | ||
.task/ | ||
build/ | ||
dist/ | ||
*.zip |
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,10 @@ | ||
{ | ||
"recommendations": [ | ||
"github.remotehub", | ||
"github.vscode-pull-request-github", | ||
"github.vscode-github-actions", | ||
"danielgavin.ols", | ||
"vadimcn.vscode-lldb", | ||
"task.vscode-task" | ||
] | ||
} |
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,17 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug", | ||
"program": "${workspaceFolder}/build/odincraft-debug", | ||
"windows": { | ||
"program": "${workspaceFolder}/build/odincraft-debug.exe" | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}", | ||
"preLaunchTask": "${defaultBuildTask}" | ||
} | ||
] | ||
} |
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,41 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "pre-debug", | ||
"detail": "Build the project prior to debugging it.", | ||
"icon": { | ||
"id": "tools", | ||
"color": "terminal.ansiCyan" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"hide": false, | ||
"dependsOn": [], | ||
"dependsOrder": "sequence", | ||
"isBackground": false, | ||
"promptOnClose": false, | ||
"type": "shell", | ||
"command": "task", | ||
"args": [ | ||
"build-debug" | ||
], | ||
"runOptions": { | ||
"instanceLimit": 1, | ||
"reevaluateOnRerun": true, | ||
"runOn": "default" | ||
}, | ||
"presentation": { | ||
"echo": false, | ||
"reveal": "silent", | ||
"focus": false, | ||
"panel": "shared", | ||
"showReuseMessage": false, | ||
"clear": false | ||
}, | ||
"problemMatcher": [] | ||
} | ||
] | ||
} |
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,13 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/DanielGavin/ols/master/misc/odinfmt.schema.json", | ||
"brace_style": "_1TBS", | ||
"character_width": 80, | ||
"convert_do": false, | ||
"exp_multiline_composite_literals": false, | ||
"indent_cases": false, | ||
"newline_limit": 1, | ||
"newline_style": "LF", | ||
"spaces": 4, | ||
"tabs": false, | ||
"tabs_width": 4 | ||
} |
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,8 @@ | ||
package pinentry_win_cred | ||
|
||
//-- Core Libraries | ||
import "core:fmt" | ||
|
||
main :: proc() { | ||
fmt.println("Hello, Odin!") | ||
} |
Oops, something went wrong.