-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Github Actions Windows-based CI runner #458
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Run tests on MacOS | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
macos_testing: | ||
runs-on: macos-10.15 | ||
|
||
steps: | ||
- name: Setup environment - Brew tap | ||
run: | | ||
brew tap osx-cross/avr | ||
brew tap osx-cross/arm | ||
|
||
- name: Setup environment - Brew install | ||
run: | | ||
brew install git doxygen boost gcc avr-gcc arm-gcc-bin cmake || true | ||
brew upgrade boost gcc git || true | ||
|
||
- name: Setup environment - Python pip | ||
run: | | ||
pip3 install --user modm scons | ||
echo "::add-path::/usr/local/bin" | ||
echo "::add-path::/Users/runner/Library/Python/3.8/bin" | ||
echo $PATH | ||
|
||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Git Submodules | ||
run: | | ||
git submodule update --init | ||
|
||
- name: Hosted Unittests | ||
run: | | ||
(cd test && make run-hosted-darwin) | ||
|
||
- name: Hosted Examples | ||
run: | | ||
(cd examples && ../tools/scripts/examples_compile.py linux) | ||
|
||
- name: Compile STM32 Examples | ||
run: | | ||
(cd examples && ../tools/scripts/examples_compile.py nucleo_f031k6 nucleo_f103rb nucleo_f303re nucleo_f411re nucleo_f746zg) | ||
(cd examples && ../tools/scripts/examples_compile.py nucleo_g071rb nucleo_l152re nucleo_l476rg nucleo_g474re) | ||
|
||
- name: Compile AVR Examples | ||
run: | | ||
(cd examples && ../tools/scripts/examples_compile.py avr) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Run ARM Cortex-M tests on Windows | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
windows_armcortexm: | ||
runs-on: windows-2019 | ||
#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@v2 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install Python packages | ||
run: | | ||
pip install --user modm scons future | ||
|
||
- name: Download ARM Toolchain | ||
shell: powershell | ||
run: | | ||
$ProgressPreference = 'SilentlyContinue' | ||
Invoke-WebRequest -OutFile gcc-arm-none-eabi-win32.zip https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-win32.zip | ||
|
||
- name: Install ARM Toolchain | ||
shell: powershell | ||
run: | | ||
Add-Type -Assembly "System.IO.Compression.Filesystem" | ||
[System.IO.Compression.ZipFile]::ExtractToDirectory("gcc-arm-none-eabi-win32.zip", "C:\arm-none-eabi-gcc") | ||
dir C:\arm-none-eabi-gcc | ||
echo "::add-path::C:\arm-none-eabi-gcc\bin" | ||
rm gcc-arm-none-eabi-win32.zip | ||
|
||
- name: Show lbuild and arm-none-eabi-gcc Version Information | ||
run: | | ||
lbuild --version | ||
arm-none-eabi-g++ --version | ||
|
||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Git Submodules | ||
shell: bash | ||
run: | | ||
git submodule update --init | ||
|
||
- name: Compile STM32 Examples | ||
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_l152re nucleo_l476rg nucleo_g474re) | ||
|
||
# - name: Compile AVR Examples | ||
# shell: bash | ||
# run: | | ||
# (cd examples && python ../tools/scripts/examples_compile.py avr) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Run hosted tests on Windows | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
windows_hosted: | ||
runs-on: windows-2019 | ||
#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@v2 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install Python packages | ||
run: | | ||
pip install --user modm scons future | ||
|
||
- name: Download MinGW installer | ||
run: | | ||
$ProgressPreference = 'SilentlyContinue' | ||
Invoke-WebRequest -OutFile mingw-get-0.6.3.zip https://acc.dl.osdn.jp/mingw/68260/mingw-get-0.6.3-mingw32-pre-20170905-1-bin.zip | ||
|
||
- name: Unpack MinGW installer | ||
shell: powershell | ||
run: | | ||
Add-Type -Assembly "System.IO.Compression.Filesystem" | ||
[System.IO.Compression.ZipFile]::ExtractToDirectory("mingw-get-0.6.3.zip", "C:\mingw-get") | ||
dir C:\mingw-get | ||
echo "::add-path::C:\mingw-get\bin" | ||
rm mingw-get-0.6.3.zip | ||
|
||
- name: Install MinGW toolchains | ||
shell: powershell | ||
run: | | ||
mingw-get install gcc g++ mingw32-make | ||
|
||
- name: Show lbuild and gcc version | ||
run: | | ||
lbuild --version | ||
gcc --version | ||
g++ --version | ||
make --version | ||
|
||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Git Submodules | ||
shell: bash | ||
run: | | ||
git submodule update --init | ||
|
||
- 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) | ||
|
||
- name: Hosted Unittests | ||
shell: bash | ||
run: | | ||
(cd test && make run-hosted-windows) |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,5 +34,7 @@ def build(env): | |
env.outbasepath = "modm/ext/crashcatcher" | ||
|
||
env.copy("crashcatcher/CrashCatcher/include/CrashCatcher.h", "include/CrashCatcher.h") | ||
ignore = "*armv7m.S" if "m0" in core else "*armv6m.S" | ||
env.copy("crashcatcher/CrashCatcher/Core/src", "src", ignore=env.ignore_files(ignore)) | ||
env.copy("crashcatcher/CrashCatcher/Core/src", "src", ignore=env.ignore_files("*.S")) | ||
version = "armv{}m".format("6" if "m0" in core else "7") | ||
env.copy("crashcatcher/CrashCatcher/Core/src/CrashCatcher_{}.S".format(version), | ||
"src/CrashCatcher_{}.sx".format(version)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I should open an issue for this in the original repo. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,10 +228,15 @@ def init(repo): | |
path = normpath(path) | ||
escaped = "\\" * (2 ** escape_level) | ||
return path.replace("\\", escaped) | ||
def posixify(path): | ||
return normpath(path).replace("\\", "/") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like this is a dumb solution, and that lbuild should have some option to reformat paths somehow, but it's all such a horrible mess, I don't want to deal with it. |
||
else: | ||
def windowsify(path, escape_level): | ||
return normpath(path) | ||
def posixify(path): | ||
return normpath(path) | ||
repo.add_filter("modm.windowsify", windowsify) | ||
repo.add_filter("modm.posixify", posixify) | ||
repo.add_filter("modm.ord", lambda letter: ord(letter[0].lower()) - ord("a")) | ||
repo.add_filter("modm.chr", lambda num: chr(num + ord("A"))) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,7 @@ | |
#ifndef MODM_LOG_LEVEL_HPP | ||
#define MODM_LOG_LEVEL_HPP | ||
|
||
#pragma push_macro("ERROR") // avoid collision with ERROR defined macro in winsock.h | ||
#undef ERROR | ||
#undef ERROR // avoid collision with ERROR defined macro in winsock.h | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. push/pop wasn't enough, not sure how to solve this properly. |
||
|
||
namespace modm | ||
{ | ||
|
@@ -59,6 +58,4 @@ namespace modm | |
#define MODM_LOG_LEVEL modm::log::DEBUG | ||
#endif // MODM_LOG_LEVEL | ||
|
||
#pragma pop_macro("ERROR") | ||
|
||
#endif // MODM_LOG_LEVEL_HPP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a hint to the
examples_compile.py
script that the example should be run and that a failure is expected.