nightly windows🌃 #1095
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: nightly windows🌃 | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 3 * * *' # run at 2 AM UTC | |
jobs: | |
check_date: | |
runs-on: ubuntu-latest | |
name: Check latest commit | |
outputs: | |
should_run: ${{ steps.should_run.outputs.should_run }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: master | |
- name: print latest_commit | |
run: echo ${{ github.sha }} | |
- id: should_run | |
continue-on-error: true | |
name: check latest commit is less than a day | |
if: ${{ github.event_name == 'schedule' }} | |
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "should_run=false" >> $GITHUB_OUTPUT | |
windows-build: | |
needs: check_date | |
if: ${{ needs.check_date.outputs.should_run != 'false' }} | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
include: | |
- PLATFORM: 'windows-64' | |
PYTHON_ARCH: 'x64' | |
VS_ARCH: 'amd64' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: master | |
submodules: 'recursive' | |
- name: Set up Python 3.11.3 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11.3" | |
- name: Cache py4godot/classes directory | |
id: cache-py4godot-classes | |
uses: actions/cache@v3 | |
with: | |
path: py4godot/classes | |
key: ${{ runner.os }}-py4godot-classes-${{ hashFiles('**/generate_classes.py', '**/generate_pxd_bridge.py', '**/extension_api.json') }} | |
restore-keys: | | |
${{ runner.os }}-py4godot-classes- | |
- name: Run Python script and check result | |
shell: bash | |
run: | | |
set +e | |
python meson_scripts/does_cache_exist.py | |
exit_code=$? | |
if [ $exit_code -eq 0 ]; then | |
echo "Cache exists" | |
# Add any actions you want to take on success | |
else | |
echo "Cache does not exist" | |
exit 0 | |
fi | |
set -e | |
- name: Print variables | |
run: | | |
python meson_scripts/variables.py | |
- name: Cache pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
python -m pip install flake8 | |
- name: Print structure | |
run: python meson_scripts/print_tools.py | |
- name: Install Mesa | |
shell: cmd | |
run: | | |
mkdir godot | |
curl.exe -L --output godot/mesa.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/20.3.2/mesa3d-20.3.2-release-msvc.7z | |
"C:\Program Files\7-Zip\7z.exe" x godot/mesa.7z -ogodot | |
cd godot | |
mklink opengl32.dll "x64\opengl32.dll" | |
mklink libglapi.dll "x64\libglapi.dll" | |
- name: Generate files | |
run: python generate.py -dev_build=True | |
- name: Conditional cythonize | |
shell: bash | |
run: | | |
set +e | |
python meson_scripts/does_cache_exist.py | |
exit_code=$? | |
set -e | |
if [ $exit_code -eq 0 ]; then | |
echo "Cache hit for py4godot/classes directory" | |
python cythonize_files.py -mode="cache" | |
else | |
echo "Cache miss for py4godot/classes directory" | |
python cythonize_files.py -mode="dev" | |
fi | |
- name: Build | |
run: python build.py --target_platform=windows64 --compiler=gcc -create_plugin=False -buildtype=release -run_tests=True -download_godot=True | |
- name: Create cache | |
run: python meson_scripts/create_cache.py | |
- name: Print structure | |
run: python meson_scripts/print_tools.py |