From bb79f994a0d5a9148cb21515528a58c50a7b8c44 Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Thu, 19 Sep 2024 10:29:50 -0300 Subject: [PATCH] fix: installer scripts (#28) * feat: upload scripts as artifact if not published * feat: log files in target/release folder * fix: app params scrapping * fix: another attempt * feat: add jq * feat: update ref * chore: make ci simpler --- .github/workflows/main.yml | 32 ++++++++++++++++++++++---------- app/Makefile | 1 + js | 2 +- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9a6256b1..aaa0420a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,12 +2,6 @@ name: Build on: workflow_dispatch: push: - pull_request: - branches: - - main - - develop - - master # for safety reasons - - dev # for safety reasons jobs: configure: @@ -27,7 +21,7 @@ jobs: sudo apt-get install -y curl protobuf-compiler build-essential git wget unzip python3 python3-pip \ libssl-dev libffi-dev libreadline-dev zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev \ libgdbm-dev libnss3-dev liblzma-dev libxml2-dev libxmlsec1-dev libffi-dev libyaml-dev \ - clang gcc-arm-none-eabi gcc-multilib llvm-dev llvm + clang gcc-arm-none-eabi gcc-multilib llvm-dev llvm jq - name: Install rust uses: actions-rs/toolchain@v1 with: @@ -72,7 +66,7 @@ jobs: sudo apt-get install -y curl protobuf-compiler build-essential git wget unzip python3 python3-pip \ libssl-dev libffi-dev libreadline-dev zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev \ libgdbm-dev libnss3-dev liblzma-dev libxml2-dev libxmlsec1-dev libffi-dev libyaml-dev \ - clang gcc-arm-none-eabi gcc-multilib llvm-dev llvm + clang gcc-arm-none-eabi gcc-multilib llvm-dev llvm jq - name: Install rust uses: actions-rs/toolchain@v1 with: @@ -117,6 +111,12 @@ jobs: tag_name: ${{ steps.nanosp.outputs.tag_name }} draft: false prerelease: false + - name: Upload script (only if not published) + if: ${{ github.ref != 'refs/heads/master' }} + uses: actions/upload-artifact@v3 + with: + name: installer_nanos_plus.sh + path: ./app/pkg/installer_nanos_plus.sh build_package_stax: needs: [configure, build_and_test] @@ -128,7 +128,7 @@ jobs: sudo apt-get install -y curl protobuf-compiler build-essential git wget unzip python3 python3-pip \ libssl-dev libffi-dev libreadline-dev zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev \ libgdbm-dev libnss3-dev liblzma-dev libxml2-dev libxmlsec1-dev libffi-dev libyaml-dev \ - clang gcc-arm-none-eabi gcc-multilib llvm-dev llvm + clang gcc-arm-none-eabi gcc-multilib llvm-dev llvm jq - name: Install rust uses: actions-rs/toolchain@v1 with: @@ -173,6 +173,12 @@ jobs: tag_name: ${{ steps.stax.outputs.tag_name }} draft: false prerelease: false + - name: Upload script (only if not published) + if: ${{ github.ref != 'refs/heads/master' }} + uses: actions/upload-artifact@v3 + with: + name: installer_stax.sh + path: ./app/pkg/installer_stax.sh build_package_flex: needs: [configure, build_and_test] @@ -184,7 +190,7 @@ jobs: sudo apt-get install -y curl protobuf-compiler build-essential git wget unzip python3 python3-pip \ libssl-dev libffi-dev libreadline-dev zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev \ libgdbm-dev libnss3-dev liblzma-dev libxml2-dev libxmlsec1-dev libffi-dev libyaml-dev \ - clang gcc-arm-none-eabi gcc-multilib llvm-dev llvm + clang gcc-arm-none-eabi gcc-multilib llvm-dev llvm jq - name: Install rust uses: actions-rs/toolchain@v1 with: @@ -229,3 +235,9 @@ jobs: tag_name: ${{ steps.flex.outputs.tag_name }} draft: false prerelease: false + - name: Upload script (only if not published) + if: ${{ github.ref != 'refs/heads/master' }} + uses: actions/upload-artifact@v3 + with: + name: installer_flex.sh + path: ./app/pkg/installer_flex.sh diff --git a/app/Makefile b/app/Makefile index 1b86767d..8a11a69b 100644 --- a/app/Makefile +++ b/app/Makefile @@ -168,6 +168,7 @@ move-files-to-output: .PHONY: read-params-from-json read-params-from-json: + ls -la target/$(FOLDER)/release $(eval T_ID := $(shell jq -r '.targetId' target/$(FOLDER)/release/app_$(FOLDER).json)) $(eval DATA_SIZE := $(shell jq -r '.dataSize' target/$(FOLDER)/release/app_$(FOLDER).json)) $(eval API_LEVEL := $(shell jq -r '.apiLevel' target/$(FOLDER)/release/app_$(FOLDER).json)) diff --git a/js b/js index a9857eac..362f0eab 160000 --- a/js +++ b/js @@ -1 +1 @@ -Subproject commit a9857eac0be6276d633c783231281e1e0e25de33 +Subproject commit 362f0eab687d719d2e308ae7af9026ee258026e0