Do not allow creating a new native windows #19 #150
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: CI for GDCEF Godot 4.x | |
on: | |
workflow_dispatch: | |
branches: | |
- godot-4.x | |
push: | |
branches: | |
- godot-4.x | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- godot-4.x | |
jobs: | |
############################################################################# | |
### MacOS | |
############################################################################# | |
build_macos: | |
name: Build on MacOS | |
runs-on: macos-14 | |
steps: | |
- name: Checkout GDCEF | |
uses: actions/checkout@v3 | |
with: | |
ref: godot-4.x | |
submodules: true | |
- name: Install system packages | |
run: | | |
brew install ninja | |
- name: Install python packages | |
uses: getsentry/action-setup-venv@v2.1.0 | |
id: venv | |
with: | |
python-version: 3.10.7 | |
cache-dependency-path: addons/gdcef/requirements.txt | |
install-cmd: pip install -r addons/gdcef/requirements.txt | |
- name: Compile GDCEF | |
run: | | |
cd addons/gdcef | |
python3 build.py | |
- name: Check build | |
run: | | |
ls cef_artifacts/libgdcef.dylib | |
tar -czvf gdcef-artifacts-godot_4-macos_x86_64.tar.gz cef_artifacts | |
- name: Do release | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "gdcef-artifacts-godot_4-macos_x86_64.tar.gz" | |
############################################################################# | |
### Linux | |
############################################################################# | |
build_linux: | |
name: Build on Linux | |
runs-on: ubuntu-20.04 | |
needs: build_macos | |
steps: | |
- name: Checkout GDCEF | |
uses: actions/checkout@v3 | |
with: | |
ref: godot-4.x | |
submodules: true | |
- name: Install system packages | |
run: | | |
sudo apt-get update | |
cd addons/gdcef | |
python3 -m pip install -r requirements.txt | |
- name: Compile GDCEF | |
run: | | |
cd addons/gdcef | |
python3 build.py | |
- name: Check build | |
run: | | |
ls cef_artifacts/gdCefRenderProcess cef_artifacts/libgdcef.so cef_artifacts/libcef.so | |
tar -czvf gdcef-artifacts-godot_4-linux_x86_64.tar.gz cef_artifacts | |
- name: Do release | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "gdcef-artifacts-godot_4-linux_x86_64.tar.gz" | |
############################################################################# | |
### Windows | |
############################################################################# | |
build_windows: | |
name: Build on Windows | |
runs-on: windows-2022 | |
needs: build_linux | |
steps: | |
# Add path for finding cl.exe | |
# FIXME: I dunno why Godot editor and godot-cpp can find cl.exe while our | |
# godot native modules cannot find it without this extra path | |
- uses: ilammy/msvc-dev-cmd@v1.10.0 | |
- name: Checkout GDCEF | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install system packages | |
shell: powershell | |
run: | | |
cd addons/gdcef | |
python3 -m pip install -r requirements.txt | |
- name: Compile GDCEF | |
shell: powershell | |
run: | | |
cd addons/gdcef | |
python3 build.py | |
- name: Check build | |
run: | | |
cd cef_artifacts | |
Test-Path -Path \a\gdcef\gdcef\cef_artifacts\gdCefRenderProcess.exe | |
Test-Path -Path \a\gdcef\gdcef\cef_artifacts\libgdcef.dll | |
Test-Path -Path \a\gdcef\gdcef\cef_artifacts\libcef.dll | |
cd - | |
tar -czvf gdcef-artifacts-godot_4-windows_x86_64.tar.gz cef_artifacts | |
- name: Do release | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "gdcef-artifacts-godot_4-windows_x86_64.tar.gz" | |
allowUpdates: true |