From ef280643173fa1a2e2c5fc290a95d84b01d11a69 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Mon, 18 Mar 2024 10:35:31 +0100 Subject: [PATCH] CI: merge the two "amalgamate" jobs --- .github/workflows/ci.yml | 60 +++++++++++++--------------------------- 1 file changed, 19 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b5df80e..3f7ba67a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -500,73 +500,51 @@ jobs: - name: Check run: cmake --build . -- -k 0 - amalgamate-h: + amalgamate: needs: gcc name: Amalgamate ArduinoJson.h runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v4 - - name: Amalgamate - id: amalgamate + - name: Setup run: | if [[ $GITHUB_REF == refs/tags/* ]]; then VERSION=${GITHUB_REF#refs/tags/} else VERSION=${GITHUB_SHA::7} fi - INPUT=src/ArduinoJson.h - OUTPUT=ArduinoJson-$VERSION.h - extras/scripts/build-single-header.sh "$INPUT" "$OUTPUT" - echo "filename=${OUTPUT}" >> $GITHUB_OUTPUT - - name: Smoke test + echo "ARDUINOJSON_H=ArduinoJson-$VERSION.h" >> $GITHUB_ENV + echo "ARDUINOJSON_HPP=ArduinoJson-$VERSION.hpp" >> $GITHUB_ENV + - name: Amalgamate ArduinoJson.h + run: extras/scripts/build-single-header.sh "src/ArduinoJson.h" "$ARDUINOJSON_H" + - name: Amalgamate ArduinoJson.hpp + run: extras/scripts/build-single-header.sh "src/ArduinoJson.hpp" "$ARDUINOJSON_HPP" + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: Single headers + path: | + ${{ env.ARDUINOJSON_H }} + ${{ env.ARDUINOJSON_HPP }} + - name: Smoke test ArduinoJson.h run: | g++ -x c++ - <> $GITHUB_OUTPUT - - name: Smoke test + - name: Smoke test ArduinoJson.hpp run: | g++ -x c++ - <