419771c50b
CI / Export Linux (push) Failing after 4s
CI / Export Android (push) Failing after 31s
CI / Export Windows (push) Failing after 43s
Test Suite / Unit Tests (GUT) (push) Failing after 33s
Test Suite / Integration Tests (push) Failing after 30s
Test Suite / Security Scan (push) Failing after 36s
Test Suite / Code Style Check (push) Failing after 41s
CI / Create Release (push) Has been skipped
223 lines
8.5 KiB
YAML
223 lines
8.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, experimental, patch-release]
|
|
pull_request:
|
|
branches: [main, experimental, patch-release]
|
|
|
|
jobs:
|
|
export-windows:
|
|
name: Export Windows
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
ACTIONS_STEP_DEBUG: true
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Setup SSH config for Gitea
|
|
run: |
|
|
echo -e "Host gitea\n HostName 100.79.174.108\n Port 222\n StrictHostKeyChecking no" >> /etc/ssh/ssh_config
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
ssh-key: ${{ secrets.TEKTON_SSH_KEY }}
|
|
ssh-strict: false
|
|
|
|
- name: Setup Godot
|
|
run: |
|
|
wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip
|
|
unzip -q Godot_v4.6-stable_linux.x86_64.zip
|
|
mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot
|
|
chmod +x /usr/local/bin/godot
|
|
|
|
- name: Install export templates
|
|
run: |
|
|
mkdir -v -p ~/.local/share/godot/export_templates/4.6.stable
|
|
wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz
|
|
unzip -q Godot_v4.6-stable_export_templates.tpz -d ~/.local/share/godot/export_templates/4.6.stable
|
|
|
|
- name: Export Windows
|
|
run: |
|
|
mkdir -p build
|
|
godot --headless --export-release "Windows Desktop" build/tekton_armageddon_windows.exe
|
|
|
|
- name: Upload Windows artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: tekton-windows
|
|
path: build/tekton_armageddon_windows.exe
|
|
retention-days: 7
|
|
|
|
export-linux:
|
|
name: Export Linux
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Setup SSH config for Gitea
|
|
run: |
|
|
echo -e "Host gitea\n HostName 100.79.174.108\n Port 222\n StrictHostKeyChecking no" >> /etc/ssh/ssh_config
|
|
|
|
- name: Diagnose git remote connectivity
|
|
run: |
|
|
echo "--- relevant env vars ---"
|
|
env | grep -Ei '^(GITHUB_|CI_|GITEA_)' || true
|
|
echo "--- /etc/ssh/ssh_config ---"
|
|
cat /etc/ssh/ssh_config
|
|
echo "--- raw TCP reachability to 100.79.174.108:222 ---"
|
|
timeout 5 bash -c 'cat < /dev/null > /dev/tcp/100.79.174.108/222' && echo "TCP 222: OPEN" || echo "TCP 222: CLOSED/UNREACHABLE"
|
|
echo "--- ls-remote against candidate hosts (verbose ssh) ---"
|
|
for url in "git@gitea:danchie/tekton.git" "git@git.klud.top:danchie/tekton.git" "ssh://git@100.79.174.108:222/danchie/tekton.git"; do
|
|
echo "=== trying $url ==="
|
|
GIT_SSH_COMMAND="ssh -vvv -o StrictHostKeyChecking=no -o ConnectTimeout=8" git ls-remote "$url" 2>&1 | tail -40
|
|
echo "exit code: $?"
|
|
done
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ssh-key: ${{ secrets.TEKTON_SSH_KEY }}
|
|
ssh-strict: false
|
|
|
|
- name: Setup Godot
|
|
run: |
|
|
wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip
|
|
unzip -q Godot_v4.6-stable_linux.x86_64.zip
|
|
mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot
|
|
chmod +x /usr/local/bin/godot
|
|
|
|
- name: Install export templates
|
|
run: |
|
|
mkdir -v -p ~/.local/share/godot/export_templates/4.6.stable
|
|
wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz
|
|
unzip -q Godot_v4.6-stable_export_templates.tpz -d ~/.local/share/godot/export_templates/4.6.stable
|
|
|
|
- name: Export Linux
|
|
run: |
|
|
mkdir -p build
|
|
godot --headless --export-release "Linux/X11" build/tekton_armageddon_linux.x86_64
|
|
|
|
- name: Upload Linux artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: tekton-linux
|
|
path: build/tekton_armageddon_linux.x86_64
|
|
retention-days: 7
|
|
|
|
export-android:
|
|
name: Export Android
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Setup SSH config for Gitea
|
|
run: |
|
|
echo -e "Host gitea\n HostName 100.79.174.108\n Port 222\n StrictHostKeyChecking no" >> /etc/ssh/ssh_config
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ssh-key: ${{ secrets.TEKTON_SSH_KEY }}
|
|
ssh-strict: false
|
|
|
|
- name: Setup Godot
|
|
run: |
|
|
wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip
|
|
unzip -q Godot_v4.6-stable_linux.x86_64.zip
|
|
mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot
|
|
chmod +x /usr/local/bin/godot
|
|
|
|
- name: Install export templates
|
|
run: |
|
|
mkdir -v -p ~/.local/share/godot/export_templates/4.6.stable
|
|
wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz
|
|
unzip -q Godot_v4.6-stable_export_templates.tpz -d ~/.local/share/godot/export_templates/4.6.stable
|
|
|
|
- name: Setup Android SDK
|
|
uses: android-actions/setup-android@v3
|
|
with:
|
|
api-level: 34
|
|
ndk-version: r26c
|
|
cmdline-tools-version: latest
|
|
|
|
- name: Export Android
|
|
run: |
|
|
mkdir -p build
|
|
godot --headless --export-release "Android" build/tekton_dash_armageddon.apk
|
|
|
|
- name: Upload Android artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: tekton-android
|
|
path: build/tekton_dash_armageddon.apk
|
|
retention-days: 7
|
|
|
|
release:
|
|
name: Create Release
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
needs: [export-windows, export-linux, export-android]
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Download Windows artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: tekton-windows
|
|
path: artifacts/windows
|
|
|
|
- name: Download Linux artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: tekton-linux
|
|
path: artifacts/linux
|
|
|
|
- name: Download Android artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: tekton-android
|
|
path: artifacts/android
|
|
|
|
- name: Get or create Gitea release
|
|
id: gitea_release
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.TEKTON_RELEASE_TOKEN }}
|
|
TAG_NAME: ${{ github.ref_name }}
|
|
run: |
|
|
API="https://git.klud.top/api/v1/repos/danchie/tekton/releases"
|
|
RELEASE_JSON=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$API/tags/$TAG_NAME")
|
|
RELEASE_ID=$(echo "$RELEASE_JSON" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*')
|
|
if [ -z "$RELEASE_ID" ]; then
|
|
RELEASE_JSON=$(curl -s -X POST \
|
|
-H "Authorization: token $GITEA_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d "{\"tag_name\": \"$TAG_NAME\", \"name\": \"$TAG_NAME\"}" \
|
|
"$API")
|
|
RELEASE_ID=$(echo "$RELEASE_JSON" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*')
|
|
fi
|
|
echo "release_id=$RELEASE_ID" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Upload Windows asset
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: token ${{ secrets.TEKTON_RELEASE_TOKEN }}" \
|
|
-H "Content-Type: multipart/form-data" \
|
|
-F "attachment=@artifacts/windows/tekton_armageddon_windows.exe" \
|
|
"https://git.klud.top/api/v1/repos/danchie/tekton/releases/${{ steps.gitea_release.outputs.release_id }}/assets"
|
|
|
|
- name: Upload Linux asset
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: token ${{ secrets.TEKTON_RELEASE_TOKEN }}" \
|
|
-H "Content-Type: multipart/form-data" \
|
|
-F "attachment=@artifacts/linux/tekton_armageddon_linux.x86_64" \
|
|
"https://git.klud.top/api/v1/repos/danchie/tekton/releases/${{ steps.gitea_release.outputs.release_id }}/assets"
|
|
|
|
- name: Upload Android asset
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: token ${{ secrets.TEKTON_RELEASE_TOKEN }}" \
|
|
-H "Content-Type: multipart/form-data" \
|
|
-F "attachment=@artifacts/android/tekton_dash_armageddon.apk" \
|
|
"https://git.klud.top/api/v1/repos/danchie/tekton/releases/${{ steps.gitea_release.outputs.release_id }}/assets" |