Add Windows build to the CI

This commit is contained in:
Sebastian Morr 2020-10-20 10:54:33 +02:00
parent 8df293b4f5
commit b76664b464
3 changed files with 26 additions and 24 deletions

View file

@ -15,22 +15,21 @@ jobs:
container: container:
image: barichello/godot-ci:3.2.3 image: barichello/godot-ci:3.2.3
steps: steps:
- name: Install dependencies
run: apt-get update && apt-get install -y rsync p7zip make
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Setup - name: Setup
run: | run: |
mkdir -p ~/.local/share/godot/templates mkdir -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/$GODOT_VERSION.stable ~/.local/share/godot/templates/$GODOT_VERSION.stable mv /root/.local/share/godot/templates/$GODOT_VERSION.stable ~/.local/share/godot/templates/$GODOT_VERSION.stable
- name: Linux Build - name: Linux Build
run: | run: make linux
mkdir -p build/$PROJECT_NAME-linux
godot --export "Linux" build/$PROJECT_NAME-linux/$PROJECT_NAME
cd build/$PROJECT_NAME-linux
zip -r ../$PROJECT_NAME-linux.zip .
- name: MacOS Build - name: MacOS Build
run: | run: make macos
godot --export "Mac OS" build/$PROJECT_NAME-macos.zip - name: Windows Build
- name: Install rsync run: make windows
run: apt-get update && apt-get install -y rsync - name: Clean up
run: make clean-unzipped
- name: Deploy - name: Deploy
uses: JamesIves/github-pages-deploy-action@3.6.2 uses: JamesIves/github-pages-deploy-action@3.6.2
with: with:

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/.import/ /.import/
/cache/ /cache/
/dependencies/ /dependencies/
/build/

View file

@ -1,31 +1,33 @@
name = "git-hydra" name = "git-hydra"
all: linux macos windows web all: linux macos windows
linux: linux:
mkdir -p /tmp/$(name)-linux mkdir -p build/$(name)-linux
/usr/bin/godot --export "Linux" "/tmp/$(name)-linux/$(name)" \godot --export "Linux" "build/$(name)-linux/$(name)"
cd /tmp && zip -r $(name)-linux.zip $(name)-linux cd build/$(name)-linux && zip -r ../$(name)-linux.zip .
macos: macos:
/usr/bin/godot --export "Mac OS" "/tmp/$(name)-macos.app" mkdir -p build
mv "/tmp/$(name)-macos.app" "/tmp/$(name)-macos.zip" \godot --export "Mac OS" "build/$(name)-macos.zip"
windows: dependencies/windows/git/ windows: dependencies/windows/git/
mkdir -p /tmp/$(name)-windows mkdir -p build/$(name)-windows
/usr/bin/godot --export "Windows" "/tmp/$(name)-windows/$(name).exe" \godot --export "Windows" "build/$(name)-windows/$(name).exe"
cp -r --parents dependencies/windows/git/ /tmp/$(name)-windows/ cp -r --parents dependencies/windows/git/ build/$(name)-windows/
cd /tmp && zip -r $(name)-windows.zip $(name)-windows cd build/$(name)-windows && zip -r ../$(name)-windows.zip .
web: clean-unzipped:
mkdir -p /tmp/$(name)-web cd build && ls | grep -v '\.zip$$' | xargs rm -r
/usr/bin/godot --export "HTML5" "/tmp/$(name)-web/index.html"
cd /tmp && zip -r $(name)-web.zip $(name)-web clean:
rm -rf build dependencies cache
# Dependencies: # Dependencies:
cache/portablegit.7z.exe: cache/portablegit.7z.exe:
mkdir -p cache
wget https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/PortableGit-2.28.0-64-bit.7z.exe -O cache/portablegit.7z.exe wget https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/PortableGit-2.28.0-64-bit.7z.exe -O cache/portablegit.7z.exe
dependencies/windows/git/: cache/portablegit.7z.exe dependencies/windows/git/: cache/portablegit.7z.exe
wine cache/portablegit.7z.exe -o dependencies/windows/git/ -y 7zr x cache/portablegit.7z.exe -odependencies/windows/git/ -y