Fix typo in CI configuration file #228
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
name: build | |
on: | |
push: | |
branches: | |
- main | |
- github-actions | |
- mono | |
- godot4 | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Build & test | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
version: | |
- "4.2" | |
- "4.2.1" | |
flavor: | |
- "vanilla" | |
- "mono" | |
steps: | |
- name: "(Shared) Check out the repository" | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
path: 'inkgd' | |
- name: "(Shared) Install test dependencies" | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install wget zip unzip libxml2-utils | |
- name: "(Shared) Inject export preset" | |
run: | | |
mv inkgd/ci_export_presets.cfg inkgd/export_presets.cfg | |
- name: "(Vanilla) Install Godot" | |
if: ${{ matrix.flavor == 'vanilla' }} | |
env: | |
VERSION: ${{ matrix.version }} | |
run: | | |
wget -q https://downloads.tuxfamily.org/godotengine/${VERSION}/Godot_v${VERSION}-stable_linux.x86_64.zip | |
unzip Godot_v${VERSION}-stable_linux.x86_64.zip | |
mv Godot_v${VERSION}-stable_linux.x86_64 godot | |
chmod +x godot | |
# This step exports a dummy PCK to force reimportation. | |
# | |
# The export is done twice, because it won't import all the required | |
# assets at first, since inkgd won't run properly at first due to… | |
# … missing assets. | |
- name: "(Vanilla) Reimport Assets" | |
if: ${{ matrix.flavor == 'vanilla' }} | |
run: | | |
./godot --headless --path "inkgd" --export-pack "HTML5" dummy.pck | |
./godot --headless --path "inkgd" --export-pack "HTML5" dummy.pck | |
- name: "(Vanilla) Run tests" | |
if: ${{ matrix.flavor == 'vanilla' }} | |
run: | | |
./godot --headless -d -s --path "inkgd" "addons/gut/gut_cmdln.gd" | |
- name: "(Mono) Install Godot" | |
if: ${{ matrix.flavor == 'mono' }} | |
env: | |
VERSION: ${{ matrix.version }} | |
run: | | |
wget -q https://downloads.tuxfamily.org/godotengine/${VERSION}/mono/Godot_v${VERSION}-stable_mono_linux_x86_64.zip | |
unzip Godot_v${VERSION}-stable_mono_linux_x86_64.zip | |
mv Godot_v${VERSION}-stable_mono_linux_x86_64 godot_mono | |
mv godot_mono/Godot_v${VERSION}-stable_mono_linux.x86_64 godot_mono/godot_mono | |
chmod +x godot_mono/godot_mono | |
- name: "(Mono) Install Ink Runtime" | |
if: ${{ matrix.flavor == 'mono' }} | |
run: | | |
wget -q https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_windows.zip | |
unzip inklecate_windows.zip | |
mv ink-engine-runtime.dll inkgd/addons/inkgd/mono/assemblies/ink-engine-runtime.dll | |
- name: "(Mono) Patch project file to match version" | |
if: ${{ matrix.flavor == 'mono' }} | |
env: | |
VERSION: ${{ matrix.version }} | |
run: | | |
VERSION_COMPONENTS=(${VERSION//./ }) | |
NUMBER_OF_COMPONENTS=${#VERSION_COMPONENTS[@]} | |
# Assuming that if the number of version components is not 3, | |
# then it's 2, therefore we add a zero at the end. | |
if [[ "$NUMBER_OF_COMPONENTS" = "3" ]]; then | |
SEMANTIC_VERSION="$VERSION" | |
else | |
SEMANTIC_VERSION="$VERSION.0" | |
fi | |
cd inkgd | |
xmllint --shell inkgd.csproj <<EOF | |
cd /Project/@Sdk | |
set Godot.NET.Sdk/${SEMANTIC_VERSION} | |
save | |
EOF | |
cd .. | |
- name: "(Mono) Compile C# solution" | |
if: ${{ matrix.flavor == 'mono' }} | |
run: | | |
./godot_mono/godot_mono --headless --quit --path "inkgd" | |
cd inkgd | |
dotnet msbuild inkgd.sln /restore /t:Build /p:Configuration=Debug | |
cd .. | |
# This step exports a dummy PCK to force reimportation. | |
# | |
# The export is done twice, because it won't import all the required | |
# assets at first, since inkgd won't run properly at first due to… | |
# … missing assets. | |
- name: "(Mono) Reimport Assets" | |
if: ${{ matrix.flavor == 'mono' }} | |
run: | | |
./godot_mono/godot_mono --headless --path "inkgd" --export-pack "HTML5" dummy.pck | |
./godot_mono/godot_mono --headless --path "inkgd" --export-pack "HTML5" dummy.pck | |
- name: "(Mono) Run tests (Mono)" | |
if: ${{ matrix.flavor == 'mono' }} | |
run: | | |
./godot_mono/godot_mono --headless -d -s --path "inkgd" "addons/gut/gut_cmdln.gd" |