mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-19 21:37:57 +08:00
85 lines
2.6 KiB
YAML
85 lines
2.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
# Run on pushes, pull-requests, and also once per day
|
|
# (in case deps change under us, etc.)
|
|
push:
|
|
pull_request:
|
|
schedule:
|
|
# Note: '*' is a special character in YAML so we have to quote the str.
|
|
- cron: '0 12 * * *'
|
|
|
|
jobs:
|
|
|
|
# We run most of our testing only on linux but it should apply to mac too;
|
|
# we can always add an explicit mac job later if it seems worthwhile.
|
|
check_linux:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11'
|
|
- name: Install dependencies
|
|
run: tools/pcommand install_pip_reqs
|
|
- name: Run checks
|
|
run: make check
|
|
|
|
# Compile a server binary and run some tests.
|
|
build_and_test_linux:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11'
|
|
- name: Install dependencies
|
|
run: tools/pcommand install_pip_reqs
|
|
- name: Compile binary
|
|
run: make cmake-server-build
|
|
- name: Run tests
|
|
run: make test
|
|
|
|
# Test spinoff projects - versions of the project with feature-sets
|
|
# added or removed or other changes made.
|
|
# (How ballisticakit becomes bombsquad/etc.)
|
|
spinoff_test_linux:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11'
|
|
- name: Install dependencies
|
|
run: tools/pcommand install_pip_reqs
|
|
- name: Build spinoff project with no featuresets
|
|
run: make spinoff-test-empty
|
|
- name: Build spinoff project with only base featureset
|
|
run: make spinoff-test-base
|
|
|
|
# Most of our toolset doesn't work on raw Windows without WSL set up,
|
|
# but we can bootstrap enough to run a few things manually. It's nice to
|
|
# run unit tests there since some behavior (filesystem, etc) can vary
|
|
# significantly between windows and linux/apple. We also are able to
|
|
# build our windows binary.
|
|
check_and_compile_windows:
|
|
runs-on: windows-2019
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pytest typing_extensions
|
|
python tools/pcommand win_ci_install_prereqs
|
|
- name: Run tests
|
|
run: python tools/pcommand pytest -v tests
|
|
- name: Compile binary
|
|
run: python tools/pcommand win_ci_binary_build
|