From c3a545bb340a93d64f78497f708a46ed7c776d6b Mon Sep 17 00:00:00 2001 From: Arcadien Date: Mon, 16 Oct 2023 09:48:05 +0200 Subject: [PATCH 1/2] Create workflow * Native test * Cross binaries production --- .github/workflows/main.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..14bd9f0 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,33 @@ +name: PlatformIO CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: | + ~/.cache/pip + ~/.platformio/.cache + key: ${{ runner.os }}-pio + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + - name: Install PlatformIO Core + run: pip install --upgrade platformio + + - name: Test project in native environment + run: pio test -e native + + - name: Build console application + run: pio run -e native + + - name: Build 'target' cross application + run: pio run -e target + + - name: Build 'gun' cross application + run: pio run -e gun From 721d112008df3c27431e9bf334e94eb8831119be Mon Sep 17 00:00:00 2001 From: Aurelien Labrosse Date: Mon, 16 Oct 2023 08:20:25 +0000 Subject: [PATCH 2/2] chore: add artifact storage --- .github/workflows/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14bd9f0..43cd223 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,3 +31,21 @@ jobs: - name: Build 'gun' cross application run: pio run -e gun + + - name: Archive code coverage results + uses: actions/upload-artifact@v3 + with: + name: consoleApp + path: ./.pio/build/native/program + + - name: Archive code coverage results + uses: actions/upload-artifact@v3 + with: + name: target.hex + path: .pio/build/target/firmware.hex + + - name: Archive code coverage results + uses: actions/upload-artifact@v3 + with: + name: gun.hex + path: .pio/build/gun/firmware.hex \ No newline at end of file