forked from bdring/FluidNC
-
Notifications
You must be signed in to change notification settings - Fork 11
94 lines (92 loc) · 2.94 KB
/
ci.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: FluidNC Continuous Integration
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
pio_env:
- noradio
- wifi
- bt
# - wifibt
# - debug
pio_env_variant:
- ""
# - "_s2"
# - "_s3"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pip"
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~/.platformio
key: platformio-${{ runner.os }}
- name: Build target ${{ matrix.pio_env }}${{ matrix.pio_env_variant }}
run: pio run -e ${{ matrix.pio_env }}${{ matrix.pio_env_variant }}
- if: matrix.os == 'ubuntu-latest'
name: Upload ${{ matrix.pio_env }}${{ matrix.pio_env_variant }} firmware.bin
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.pio_env }}${{ matrix.pio_env_variant }}_firmware
path: |
.pio/build/${{ matrix.pio_env }}${{ matrix.pio_env_variant }}/firmware.*
.pio/build/${{ matrix.pio_env }}${{ matrix.pio_env_variant }}/partitions.bin
tests:
strategy:
matrix:
include:
- os: ubuntu-latest
pio_env: tests
- os: macos-latest
pio_env: tests
- os: windows-latest
pio_env: tests_nosan
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
# Windows has issues running gtest code with the included gcc, so install
# MSYS2 and use that instead (remember to add it to the path)
- if: matrix.os == 'windows-latest'
name: Install MSYS2 (Windows)
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
location: D:\
install: mingw-w64-ucrt-x86_64-gcc
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pip"
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~/.platformio
key: platformio-${{ runner.os }}
# Separate run task for Windows, since it has issues with the included gcc
- if: matrix.os == 'windows-latest'
name: Run tests (Windows)
run: |
$env:PATH = "D:\msys64\mingw64\bin;D:\msys64\usr\bin;D:\msys64\ucrt64\bin;" + $env:PATH
pio test -e ${{ matrix.pio_env }} -vv
- if: matrix.os != 'windows-latest'
name: Run tests
run: pio test -e ${{ matrix.pio_env }} -vv