.github/workflows/weekly-linux.yml #107
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: weekly linux | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 3 * * 1' # 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@v2 | |
- 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 "::set-output name=should_run::false" | |
linux-build: | |
needs: check_date | |
if: ${{ needs.check_date.outputs.should_run != 'false' }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- PLATFORM: 'linux64' | |
PYTHON_ARCH: 'x64' | |
VS_ARCH: 'amd64' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8.8" | |
- name: Install Mesa | |
run: | | |
sudo add-apt-repository ppa:oibaf/graphics-drivers | |
sudo apt update | |
sudo apt upgrade | |
sudo apt-get install xvfb | |
- name: print structure | |
run: | | |
python3 meson_scripts/print_tools.py | |
- name: Install dependencies | |
run: | | |
python3 -m pip install -r requirements.txt | |
python3 -m pip install flake8 | |
- name: Init submodule | |
run: | | |
git submodule init | |
git submodule update | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: build | |
run: | | |
xvfb-run --auto-servernum python3 build.py --target_platform=linux64 --compiler=clang -run_tests=true -download_godot=true | |
- name: print structure | |
run: | | |
python3 meson_scripts/print_tools.py | |
- name: test | |
run: | | |
xvfb-run --auto-servernum meson test -C build_meson/linux64 | |