-
Notifications
You must be signed in to change notification settings - Fork 8
71 lines (61 loc) · 2.58 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
64
65
66
67
68
69
70
71
name: CI
on: [push, pull_request]
jobs:
lint-python-scripts:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v3
- 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 --ignore=E743 tests/*.py tests/utilities/*.py tests/generated_test_cases/*.py
- name: Run mypy on the project
run: mypy --disallow-incomplete-defs --no-implicit-optional tests/*.py tests/utilities/*.py tests/generated_test_cases/*.py
build-and-run-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: Install tools & libraries (Ubuntu)
run: |
sudo apt update
sudo apt install python3 python3-pytest acpica-tools cmake gcc-multilib g++-multilib
# https://github.com/actions/runner-images/issues/9491#issuecomment-1989718917
sudo sysctl vm.mmap_rnd_bits=28
- if: ${{ matrix.os == 'macos-latest' }}
name: Install tools & libraries (MacOS)
run: |
export PIP_BREAK_SYSTEM_PACKAGES=1
brew install python3 acpica cmake
python3 -m pip install pytest
- if: ${{ matrix.os == 'windows-latest' }}
name: Install tools & libraries (Windows)
run: |
choco install python3 iasl cmake llvm
python3 -m pip install pytest
- name: Ensure reduced-hardware/unsized-frees/fmt-logging build compiles
run: |
cd ${{ github.workspace}}/tests/runner
mkdir reduced-hw-build && cd reduced-hw-build
cmake .. -DREDUCED_HARDWARE_BUILD=1 -DSIZED_FREES_BUILD=0 -DFORMATTED_LOGGING_BUILD=1
cmake --build .
- name: Run tests (64-bit)
run: python3 ${{ github.workspace }}/tests/run_tests.py --bitness=64 --large
# MacOS doesn't want to compile i386 (at least easily) so just ignore it:
# ld: warning: The i386 architecture is deprecated for macOS
# ld: dynamic executables or dylibs must link with libSystem.dylib for architecture i386
# clang: error: linker command failed with exit code 1 (use -v to see invocation)
- if: ${{ matrix.os != 'macos-latest' }}
name: Run tests (32-bit)
run: python3 ${{ github.workspace }}/tests/run_tests.py --bitness=32 --large