-
Notifications
You must be signed in to change notification settings - Fork 134
96 lines (80 loc) · 3.97 KB
/
windows.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
95
96
name: Run tests on Windows
on: [pull_request]
jobs:
windows_testing:
runs-on: windows-2022
env:
PYTHONIOENCODING: "utf-8"
steps:
# Disabling snake-oil for performance reasons
- name: Disable Windows Defender
run: Set-MpPreference -DisableRealtimeMonitoring $true
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Python packages
run: |
pip install --upgrade --upgrade-strategy=eager modm scons future
- name: Download GCCs for Windows
shell: powershell
run: |
$ProgressPreference = 'SilentlyContinue'
Start-Job { Set-Location $using:PWD; Invoke-WebRequest -OutFile gcc-win64.zip https://github.com/brechtsanders/winlibs_mingw/releases/download/12.2.0-15.0.6-10.0.0-msvcrt-r3/winlibs-x86_64-posix-seh-gcc-12.2.0-mingw-w64msvcrt-10.0.0-r3.zip }
Start-Job { Set-Location $using:PWD; Invoke-WebRequest -OutFile gcc-arm-none-eabi-win64.zip https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi.zip }
Start-Job { Set-Location $using:PWD; Invoke-WebRequest -OutFile gcc-avr-win64.zip https://github.com/ZakKemble/avr-gcc-build/releases/download/v13.2.0-1/avr-gcc-13.2.0-x64-windows.zip }
Get-Job | Wait-Job
- name: Install GCC Toolchain
shell: powershell
run: |
Add-Type -Assembly "System.IO.Compression.Filesystem"
[System.IO.Compression.ZipFile]::ExtractToDirectory("gcc-win64.zip", "C:\gcc-win64")
dir C:\gcc-win64\mingw64
echo "C:\gcc-win64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install ARM Toolchain
shell: powershell
run: |
Add-Type -Assembly "System.IO.Compression.Filesystem"
[System.IO.Compression.ZipFile]::ExtractToDirectory("gcc-arm-none-eabi-win64.zip", "C:\gcc-arm-none-eabi-win64")
dir C:\gcc-arm-none-eabi-win64\arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi
echo "C:\gcc-arm-none-eabi-win64\arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install AVR Toolchain
shell: powershell
run: |
Add-Type -Assembly "System.IO.Compression.Filesystem"
[System.IO.Compression.ZipFile]::ExtractToDirectory("gcc-avr-win64.zip", "C:\gcc-avr-win64")
dir C:\gcc-avr-win64\avr-gcc-13.2.0-x64-windows
echo "C:\gcc-avr-win64\avr-gcc-13.2.0-x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Show Version Information
run: |
gcc --version
g++ --version
make --version
arm-none-eabi-g++ --version
avr-g++ --version
lbuild --version
python -c "import os; print(os.cpu_count())"
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Hosted Examples
shell: bash
run: |
(cd examples && python ../tools/scripts/examples_compile.py linux/assert linux/block_device linux/build_info linux/git linux/logger linux/printf linux/etl linux/fiber)
- name: Hosted Unittests
if: always()
shell: bash
run: |
(cd test && make run-hosted-windows)
- name: Compile STM32 Examples
if: always()
shell: bash
run: |
(cd examples && python ../tools/scripts/examples_compile.py nucleo_f031k6 nucleo_f103rb nucleo_f303re nucleo_f411re nucleo_f746zg)
(cd examples && python ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l031k6 nucleo_l152re nucleo_l476rg nucleo_g474re)
- name: Compile AVR Examples
if: always()
shell: bash
run: |
(cd examples && ../tools/scripts/examples_compile.py avr arduino_nano arduino_uno srxe)