Skip to content
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

CI/CD - Add self hosted support, and add some basic vscode suggestions and fixes #113

Merged
merged 2 commits into from
Apr 18, 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
2 changes: 1 addition & 1 deletion .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_SECRET_WRITE_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/client-build-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ on:
value: ${{ jobs.client-build-tool.outputs.version }}
secrets:
gcp-secret:
required: false
required: true
cicd-token-github:
required: true
ITCH_IO_CICD:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deployment-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
game-export-preset: Windows
game-binary-name: The Mirror Dev.exe
bucket-name: no-bucket
os: "windows-latest"
os: ${{ github.event.repository.name != 'the-mirror' && fromJSON('[ "self-hosted", "Windows"]') || 'windows-latest' }}
# TODO: This will be dynamic in future and we can't do that immediately as we have to focus on the deployment side.
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/4309e8e8/MirrorGodotEditorWindows.exe
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/4309e8e8/windows_release_x86_64.exe
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
game-export-preset: MacOS-themirror-dev
game-binary-name: The Mirror Dev.app
bucket-name: no-bucket
os: "macos-latest"
os: ${{ github.event.repository.name != 'the-mirror' && fromJSON('[ "self-hosted", "MacOS"]') || 'macos-latest' }}
# TODO: This will be dynamic in future and we can't do that immediately as we have to focus on the deployment side.
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/4309e8e8/MirrorGodotEditorMac.app.zip
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/4309e8e8/macos_template.app.zip
Expand All @@ -92,7 +92,7 @@ jobs:
game-export-preset: Linux
game-binary-name: The Mirror Dev.x86_64
bucket-name: no-bucket
os: "ubuntu-20.04"
os: ${{ github.event.repository.name != 'the-mirror' && fromJSON('[ "self-hosted", "Linux"]') || 'ubuntu-20.04' }}
# TODO: This will be dynamic in future and we can't do that immediately as we have to focus on the deployment side.
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/4309e8e8/MirrorGodotEditorLinux.x86_64
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/4309e8e8/linux_release.x86_64
7 changes: 4 additions & 3 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
GCP_BUCKET_UPLOAD: ${{ secrets.GCP_BUCKET_UPLOAD }}
with:
environment: "dev"
self-hosted-runner: ${{ github.event.repository.name != 'the-mirror' }}

build-windows-client:
name: 🏁 Build Windows Dev PR
Expand All @@ -43,7 +44,7 @@ jobs:
game-export-preset: Windows
game-binary-name: The Mirror Dev.exe
bucket-name: no-bucket
os: "windows-latest"
os: ${{ github.event.repository.name != 'the-mirror' && fromJSON('[ "self-hosted", "Windows"]') || 'windows-latest' }}
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/${{needs.get-or-build-engine.outputs.commit_hash}}/MirrorGodotEditorWindows.exe
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/${{needs.get-or-build-engine.outputs.commit_hash}}/windows_release_x86_64.exe
build-macos-client:
Expand Down Expand Up @@ -72,7 +73,7 @@ jobs:
game-export-preset: MacOS-themirror-dev
game-binary-name: The Mirror Dev.app
bucket-name: no-bucket
os: "macos-latest"
os: ${{ github.event.repository.name != 'the-mirror' && fromJSON('[ "self-hosted", "MacOS"]') || 'macos-latest' }}
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/${{needs.get-or-build-engine.outputs.commit_hash}}/MirrorGodotEditorMac.app.zip
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/${{needs.get-or-build-engine.outputs.commit_hash}}/macos_template.app.zip
build-linux-client:
Expand All @@ -99,6 +100,6 @@ jobs:
game-export-preset: Linux
game-binary-name: The Mirror Dev.x86_64
bucket-name: no-bucket
os: "ubuntu-20.04"
os: ${{ github.event.repository.name != 'the-mirror' && fromJSON('[ "self-hosted", "Linux"]') || 'ubuntu-20.04' }}
editor-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/${{needs.get-or-build-engine.outputs.commit_hash}}/MirrorGodotEditorLinux.x86_64
template-download-url: https://storage.googleapis.com/mirror_native_client_builds/Engine/${{needs.get-or-build-engine.outputs.commit_hash}}/linux_release.x86_64
9 changes: 6 additions & 3 deletions .github/workflows/engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
environment:
required: true
type: string
self-hosted-runner:
required: true
type: boolean
secrets:
GCP_BUCKET_UPLOAD:
required: true
Expand Down Expand Up @@ -33,7 +36,7 @@ concurrency:

jobs:
build-windows:
runs-on: "windows-latest"
runs-on: ${{ inputs.self-hosted-runner && fromJSON('[ "self-hosted", "Windows"]') || 'windows-latest' }}
name: ${{ matrix.name }}
environment: ${{ inputs.environment }}
strategy:
Expand Down Expand Up @@ -134,7 +137,7 @@ jobs:
path: ./godot-engine/bin/${{ matrix.artifact-name }}.exe
destination: ${{ matrix.bucket-name }}/${{steps.vars.outputs.sha_short}}/
build-macos:
runs-on: "macos-latest"
runs-on: ${{ inputs.self-hosted-runner && fromJSON('[ "self-hosted", "MacOS"]') || 'macos-latest' }}
name: ${{ matrix.name }}
environment: ${{ inputs.environment }}
strategy:
Expand Down Expand Up @@ -275,7 +278,7 @@ jobs:
path: ./godot-engine/bin/${{ matrix.artifact-name }}.zip
destination: ${{ matrix.bucket-name }}/${{steps.vars.outputs.sha_short}}/
build-linux:
runs-on: "ubuntu-20.04" # MUST run on the old version for GLIBC compatibility
runs-on: ${{ inputs.self-hosted-runner && fromJSON('[ "self-hosted", "Linux"]') || 'ubuntu-20.04' }}
name: ${{ matrix.name }}
environment: ${{ inputs.environment }}
strategy:
Expand Down
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"ms-vscode.cpptools",
"ms-vscode.cpptools-themes",
"ms-vscode.cpptools-extension-pack",
"geequlim.godot-tools",
"esbenp.prettier-vscode",
"ms-python.python",
"ms-python.debugpy",
"ms-python.vscode-pylance"
Kluskey marked this conversation as resolved.
Show resolved Hide resolved
]
}
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"editor.autoIndent": "keep",
"cSpell.language": "en,en-US",
"cSpell.enableFiletypes": [
"bat",
"dockercompose",
"dockerfile",
"gdscript",
"gdshader",
"github-actions-workflow",
"makefile",
"markdown",
"typescript",
"typescriptreact",
"shellscript"
]
}
Loading