-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 1.76 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on: [push, pull_request]
jobs:
lint-python-scripts:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install flake8 & mypy
run: |
sudo apt update
sudo apt install python3 python3-pip
pip install flake8 mypy
- name: Run flake8 on the project
run: flake8 *.py scripts/*.py
- name: Run mypy on the project
run: |
mypy --disallow-incomplete-defs --no-implicit-optional *.py
# Do this because otherwise mypy complains:
# 'Cannot find implementation or library stub for module named "image_utils.path_guesser" [import-not-found]'
pushd scripts
mypy --disallow-incomplete-defs --no-implicit-optional *.py
popd
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest]
arch: [i686, x86_64]
toolchain: [gcc, clang]
exclude:
# FIXME: the GCC build somehow ends up being corrupted with
# libexec/cc1 containing garbage data.
- os: macos-latest
toolchain: gcc
steps:
- uses: actions/checkout@v3
with:
submodules: true
- if: ${{ matrix.toolchain == 'gcc' }}
uses: actions/[email protected]
with:
path: "${{ github.workspace }}/toolchain/tools_${{ matrix.arch }}"
key: "${{ runner.os }}-${{ runner.arch }}-${{ matrix.arch }}-gcc"
# TODO: maybe split these steps
- name: Build platform toolchain & Kernel
run: "${{ github.workspace }}/build.py --arch ${{ matrix.arch }} --toolchain ${{ matrix.toolchain }} --no-tune-native"