Separate targets in makefile #23
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: Test build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: read | |
jobs: | |
make-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: repo | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
repo/build/lwip2-src | |
esp8266/tools/dist | |
key: ${{ runner.os }}-make-${{ hashFiles('repo/makefiles/Makefile.*', 'repo/makefiles/include/*.mk', 'repo/Makefile*') }} | |
- name: Fetch ESP8266 Core | |
uses: actions/checkout@v3 | |
with: | |
path: esp8266 | |
repository: esp8266/Arduino | |
fetch-depth: 1 | |
submodules: false | |
- name: Get toolchain files | |
run: | | |
cd esp8266/tools | |
python get.py -q | |
- name: Build | |
env: | |
ESP8266_ARDUINO_CORE_DIR: ${{ github.workspace }}/esp8266 | |
run: | | |
make -C repo/ -j$(nproc) \ | |
LIBS=${{ github.workspace }}/install \ | |
INC=${{ github.workspace }}/install/include \ | |
PREFIX=${ESP8266_ARDUINO_CORE_DIR} \ | |
arduino/upstream | |
pushd install | |
zip --quiet --recurse-paths ../lwip2-build.zip ./ | |
popd | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Build | |
path: lwip2-build.zip | |
cmake-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: repo | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
build/_deps/lwip2-src | |
build/_deps/lwip2-subbuild | |
esp8266/tools/dist | |
key: ${{ runner.os }}-cmake-${{ hashFiles('repo/CMakeLists.txt', 'repo/cmake/*.cmake') }} | |
- name: Fetch ESP8266 Core | |
uses: actions/checkout@v3 | |
with: | |
path: esp8266 | |
repository: esp8266/Arduino | |
fetch-depth: 1 | |
submodules: false | |
- name: Get toolchain files | |
run: | | |
cd esp8266/tools | |
python get.py -q | |
- name: Build | |
env: | |
ESP8266_ARDUINO_CORE_DIR: ${{ github.workspace }}/esp8266 | |
run: | | |
cmake \ | |
--toolchain=${{ github.workspace }}/repo/cmake/toolchain-esp8266.cmake \ | |
-DCMAKE_PROGRAM_PATH=${ESP8266_ARDUINO_CORE_DIR}/tools/xtensa-lx106-elf/bin \ | |
-DESP8266_ARDUINO_CORE_DIR=${ESP8266_ARDUINO_CORE_DIR} \ | |
-S repo \ | |
-B build | |
cmake --build build/ --parallel $(nproc) |