Add support for multiple configuration to deduplicate examples #2889
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run hosted tests on Windows | |
on: [pull_request] | |
jobs: | |
windows_hosted: | |
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 --user modm scons future | |
- name: Download GCC for Windows | |
run: | | |
$ProgressPreference = 'SilentlyContinue' | |
Invoke-WebRequest -OutFile winlibs-gcc.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 | |
- name: Unpack GCC for Windows | |
shell: powershell | |
run: | | |
Add-Type -Assembly "System.IO.Compression.Filesystem" | |
[System.IO.Compression.ZipFile]::ExtractToDirectory("winlibs-gcc.zip", "C:\winlibs-gcc") | |
dir C:\winlibs-gcc | |
dir C:\winlibs-gcc\mingw64 | |
echo "C:\winlibs-gcc\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Show lbuild and gcc version | |
run: | | |
lbuild --version | |
gcc --version | |
g++ --version | |
make --version | |
python -c "import os; print(os.cpu_count())" | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Update lbuild | |
run: | | |
pip3 install --upgrade --upgrade-strategy=eager modm | |
- 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) |