-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (82 loc) · 3.91 KB
/
build_debug.yml
File metadata and controls
98 lines (82 loc) · 3.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Debug build
run-name: Menu template build
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
workflow_dispatch:
inputs:
job_target:
description: 'Select the platform'
required: true
default: 'Both'
type: choice
options:
- Linux
- Windows
- Both
env:
GODOT_VERSION: 4.4
GODOT_PROJECT_LOCATION: ./project.godot
EXPORT_FOLDER_LINUX: bin/linux
EXPORT_FOLDER_WINDOWS: bin/windows
APPLICATION_NAME: menu_template
jobs:
build:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: Settings extra variables
run:
export DATE=$(date +'%Y-%m-%d')
echo "DATE=$DATE" >> $GITHUB_ENV
echo "MAIN_FOLDER=$(pwd)" >> $GITHUB_ENV
echo "JOB_TARGET='Both'" >> $GITHUB_ENV
- name: Vérifier la variable MAIN_FOLDER
run: |
echo "MAIN_FOLDER: ${{ env.MAIN_FOLDER }}"
- name: Debug job target
run: echo ${{ env.JOB_TARGET }}
- name: Installing dependencies
run: pacman -Syu --noconfirm git bash yasm python python-pip scons gcc diffutils make wget unzip tar mingw-w64 fontconfig
- name: Checkout submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Prepare Godot
run: |
wget -q -O godot_linux.zip https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION}}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64.zip
unzip godot_linux.zip
wget -q -O godot_export_templates.tpz https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
mkdir -p ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
unzip godot_export_templates.tpz -d ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
mv ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/templates/* ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
- name: Créer le dossier d’export Linux
run: mkdir -p ${{ env.MAIN_FOLDER }}/${{ env.EXPORT_FOLDER_LINUX }}
- name: Créer le dossier d’export Windows
run: mkdir -p ${{ env.MAIN_FOLDER }}/${{ env.EXPORT_FOLDER_WINDOWS }}
- name: Building debug Linux
run: |
mkdir -p ${{ env.EXPORT_FOLDER_LINUX }}
./Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64 --import ${{ env.GODOT_PROJECT_LOCATION }} --quiet --headless --export-debug --verbose Linux ${{ env.MAIN_FOLDER }}/${{ env.EXPORT_FOLDER_LINUX }}/${{ env.APPLICATION_NAME }}.x86_64 --verbose
chmod +x ${{ env.EXPORT_FOLDER_LINUX }}/${{ env.APPLICATION_NAME }}.sh --verbose
chmod +x ${{ env.EXPORT_FOLDER_LINUX }}/${{ env.APPLICATION_NAME }}.x86_64 --verbose
- name: Tar files
run: tar -cvf ${{ env.APPLICATION_NAME }}_linux_debug_${{ env.DATE }}.tar ${{ env.EXPORT_FOLDER_LINUX }}
- name: Uploading GDExtension Linux artifact debug
uses: actions/upload-artifact@v4
with:
name: ${{ env.APPLICATION_NAME }}_linux_debug_${{ env.DATE }}.tar
path: ${{ env.APPLICATION_NAME }}_linux_debug_${{ env.DATE }}.tar
- name: Building debug Windows
run: |
mkdir -p ${{ env.EXPORT_FOLDER_WINDOWS }}
./Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64 --import ${{ env.GODOT_PROJECT_LOCATION }} --quiet --headless --export-debug Windows ${{ env.MAIN_FOLDER }}/${{ env.EXPORT_FOLDER_WINDOWS }}/${{ env.APPLICATION_NAME }}.exe
- name: Uploading GDExtension Windows artifact debug
uses: actions/upload-artifact@v4
with:
name: ${{ env.APPLICATION_NAME }}_windows_debug_${{ env.DATE }}
path: ${{ env.EXPORT_FOLDER_WINDOWS }}/