Skip to content

Commit

Permalink
fix: installer scripts (#28)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
emmanuelm41 authored Sep 19, 2024
1 parent 8b8953c commit bb79f99
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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]
Expand All @@ -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:
Expand Down Expand Up @@ -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]
Expand All @@ -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:
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion js

0 comments on commit bb79f99

Please sign in to comment.