mirror of https://github.com/Nonannet/copapy.git
64 lines
1.6 KiB
YAML
64 lines
1.6 KiB
YAML
name: CI Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
name: Linting, typechecking and testing code
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10"]
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup cross compilers
|
|
run: sudo apt-get update && sudo apt-get install -y mingw-w64
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install -e .
|
|
|
|
- name: Build ops obj file
|
|
run: bash build_ops_obj.sh
|
|
|
|
- name: Build runner
|
|
run: |
|
|
mkdir bin
|
|
gcc -Wall -Wextra -Wconversion -Wsign-conversion -Wshadow -Wstrict-overflow -Werror src/runner/runmem2.c -Wall -O3 -o bin/runmem2
|
|
x86_64-w64-mingw32-gcc -Wall -Wextra -Wconversion -Wsign-conversion -Wshadow -Wstrict-overflow -Werror src/runner/runmem2.c -Wall -O3 -o bin/runmem2.exe
|
|
|
|
#- name: Lint code with flake8
|
|
# run: flake8
|
|
|
|
#- name: Type checking with mypy
|
|
# run: mypy
|
|
|
|
#- name: Run tests with pytest
|
|
# run: pytest
|
|
|
|
- name: Upload obj files
|
|
uses: actions/upload-artifact@v4
|
|
if: strategy.job-index == 0
|
|
with:
|
|
name: object files
|
|
path: src/copapy/obj/*.o
|
|
|
|
- name: Upload compiled runner
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: runner
|
|
path: bin/* |