File: test.yml

package info (click to toggle)
m1n1 1.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,468 kB
  • sloc: python: 42,002; ansic: 33,376; asm: 1,101; makefile: 271; xml: 177; sh: 116
file content (66 lines) | stat: -rw-r--r-- 1,601 bytes parent folder | download | duplicates (2)
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-13
            compiler: llvm-brew
          - os: macos-14
            compiler: llvm-brew

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        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