forked from AsahiLinux/m1n1
-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (55 loc) · 1.56 KB
/
test.yml
File metadata and controls
66 lines (55 loc) · 1.56 KB
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
name: test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Pytest (${{ matrix.os }} + ${{ matrix.compiler }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
compiler: gcc
- os: ubuntu-latest
compiler: llvm
- os: macos-14
compiler: llvm-brew
- os: macos-15
compiler: llvm-brew
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Install arm64 GCC cross-compiler
if: matrix.compiler == 'gcc'
run: |
sudo apt-get update
sudo apt install gcc-aarch64-linux-gnu
- name: Install Clang
if: matrix.compiler == 'llvm'
run: |
sudo apt-get update
sudo apt-get install -y llvm lld
- name: Install Clang on macOS w/ brew
if: matrix.compiler == 'llvm-brew'
run: |
brew install llvm lld
- name: Run pytest with clang
if: matrix.os == 'ubuntu-latest' && matrix.compiler == 'llvm'
env:
USE_CLANG: '1'
run: PATH="$(llvm-config --prefix)/bin:$PATH" pytest
- name: Run pytest without clang
if: matrix.compiler != 'llvm'
run: pytest