Fix build ? #266
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: PlatformIO CI | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
paxo_v5_build_test_upload: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.platformio/.cache | |
.pio/build_cache | |
.pio/libdeps | |
key: ${{ runner.os }}-platformio-ci-paxo-v5 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install PlatformIO Core | |
run: pip install --upgrade platformio | |
# We are unable to run tests on ESP32 | |
- name: Build PlatformIO Project for Paxo ESP32 | |
run: pio run -e paxo-v5 | |
- name: Move files into artifact directory | |
shell: bash | |
run: | | |
mkdir build | |
cp -r .pio/build/paxo-v5/firmware.bin build | |
cp -r .pio/build/paxo-v5/firmware.elf build | |
[[ -e .pio/build/paxo-v5/firmware.map ]] && cp -r .pio/build/paxo-v5/firmware.map build | |
cp -r .pio/build/paxo-v5/bootloader.bin build | |
cp -r .pio/build/paxo-v5/partitions.bin build | |
cp -r storage build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: paxo-v5-build | |
include-hidden-files: true | |
path: | | |
build/ | |
linux_build_test_upload: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.platformio/.cache | |
.pio/build_cache | |
.pio/libdeps | |
key: ${{ runner.os }}-platformio-ci-linux | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install PlatformIO Core | |
run: pip install --upgrade platformio | |
- name: Install SDL2 and libcurl | |
run: sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" && sudo apt-get update -y -qq && sudo apt-get install libsdl2-dev && sudo apt-get install libcurl4-openssl-dev | |
- name: Run tests for Linux | |
run: pio test -e linux --json-output-path linux-test-report.json --junit-output-path linux-test-report.xml | |
- name: Upload test reports | |
if: success() || failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-test-reports | |
path: | | |
linux-test-report.json | |
linux-test-report.xml | |
- name: Build PlatformIO Project for Linux | |
run: pio run -e linux | |
- name: Move files into artifact directory | |
shell: bash | |
run: | | |
mkdir build | |
cp -r .pio/build/linux/program build | |
cp -r storage build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-build | |
include-hidden-files: true | |
path: | | |
build/ | |
macos_build_test_upload: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.platformio/.cache | |
.pio/build_cache | |
.pio/libdeps | |
key: ${{ runner.os }}-platformio-ci-macos | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install PlatformIO Core | |
run: pip install --upgrade platformio | |
- name: Install SDL2 | |
run: brew install SDL2 | |
- name: Run tests for macOS | |
run: DYLD_LIBRARY_PATH="`brew --prefix sdl2`/lib" pio test -e macos --json-output-path macos-test-report.json --junit-output-path macos-test-report.xml | |
- name: Upload test reports | |
if: success() || failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-test-reports | |
path: | | |
macos-test-report.json | |
macos-test-report.xml | |
- name: Build PlatformIO Project for macOS | |
run: DYLD_LIBRARY_PATH="`brew --prefix sdl2`/lib" pio run -e macos | |
- name: Move files into artifact directory | |
shell: bash | |
run: | | |
mkdir build | |
cp -r .pio/build/macos/program build | |
cp -r storage build | |
chmod +x build/program | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-build | |
include-hidden-files: true | |
path: | | |
build/ | |
windows_build_test_upload: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.platformio/.cache | |
.pio/build_cache | |
.pio/libdeps | |
key: ${{ runner.os }}-platformio-ci-windows | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install PlatformIO Core | |
run: pip install --upgrade platformio | |
- name: Run tests for Windows | |
run: pio test -e windows --json-output-path windows-test-report.json --junit-output-path windows-test-report.xml | |
- name: Upload test reports | |
if: success() || failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-test-reports | |
path: | | |
windows-test-report.json | |
windows-test-report.xml | |
- name: Build PlatformIO Project for Windows | |
run: pio run -e windows | |
- name: Move files into artifact directory | |
shell: bash | |
run: | | |
mkdir build | |
cp -r .pio/build/windows/program.exe build | |
cp -r .pio/build/windows/*.dll build | |
cp -r storage build | |
- name: Copy required DLLs into artifact directory | |
run: python scripts/github_actions/windows/get_dll.py build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-build | |
include-hidden-files: true | |
path: | | |
build/ |