Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
only one job for build package step
Browse files Browse the repository at this point in the history
  • Loading branch information
ftheirs committed Mar 21, 2022
1 parent 3cee831 commit b12cb0e
Showing 1 changed file with 18 additions and 59 deletions.
77 changes: 18 additions & 59 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ jobs:
cd ./app/rust
cargo clippy --version
cargo clippy --all-features --all-targets || true
# - name: audit
# run: |
# cd ./app/rust
# cargo audit --version
# cargo audit
- name: run tests
run: |
cd ./app/rust
Expand Down Expand Up @@ -150,7 +145,7 @@ jobs:
export PATH=~/.cargo/bin:$PATH
cd tests_zemu && yarn testSR25519
build_package_0:
build_package:
needs: [ configure, build, build_ledger, test_zemu, test_zemu_sr25519 ]
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
Expand All @@ -174,40 +169,21 @@ jobs:
run: |
source $HOME/.cargo/env
make SUBSTRATE_PARSER_FULL=0
mv ./app/pkg/installer_s.sh ./app/pkg/installer_nanos_light.sh
mv ./app/pkg/installer_s.sh ./app/pkg/installer_nanos.sh
- name: Set tag
id: nanos_light
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanos_light.sh version)
id: nanos
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanos.sh version)
- name: Create or Update Release (1)
id: create_release_0
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
files: ./app/pkg/installer_nanos_light.sh
tag_name: ${{ steps.nanos_light.outputs.tag_name }}
files: ./app/pkg/installer_nanos.sh
tag_name: ${{ steps.nanos.outputs.tag_name }}
draft: false
prerelease: false

build_package_1:
needs: [ configure, build, build_ledger, test_zemu, test_zemu_sr25519 ]
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
container:
image: zondax/builder-bolos:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk
BOLOS_ENV: /opt/bolos
HOME: /home/zondax_circle
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Install deps
run: pip install ledgerblue

- name: Build NanoS XL
shell: bash -l {0}
run: |
Expand All @@ -217,8 +193,8 @@ jobs:
- name: Set tag
id: nanos_xl
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanos_xl.sh version)
- name: Update Release
id: update_release_1
- name: Create or Update Release (1)
id: create_release_1
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
Expand All @@ -228,41 +204,24 @@ jobs:
draft: false
prerelease: false

build_package_2:
needs: [ configure, build, build_ledger, test_zemu, test_zemu_sr25519 ]
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
container:
image: zondax/builder-bolos:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
BOLOS_SDK: ${{ github.workspace }}/deps/nanosplus-secure-sdk
BOLOS_ENV: /opt/bolos
HOME: /home/zondax_circle
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Install deps
run: pip install ledgerblue

- name: Build NanoSP XL
- name: Build NanoSP
env:
BOLOS_SDK: ${{ github.workspace }}/deps/nanosplus-secure-sdk
shell: bash -l {0}
run: |
source $HOME/.cargo/env
make SUBSTRATE_PARSER_FULL=1
mv ./app/pkg/installer_s2.sh ./app/pkg/installer_nanosp_xl.sh
mv ./app/pkg/installer_s2.sh ./app/pkg/installer_nanos_plus.sh
- name: Set tag
id: nanosp_xl
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanosp_xl.sh version)
- name: Update Release
id: update_release_2
id: nanosp
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanos_plus.sh version)
- name: Create or Update Release (1)
id: create_release_2
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
files: ./app/pkg/installer_nanosp_xl.sh
tag_name: ${{ steps.nanosp_xl.outputs.tag_name }}
files: ./app/pkg/installer_nanos_plus.sh
tag_name: ${{ steps.nanosp.outputs.tag_name }}
draft: false
prerelease: false

0 comments on commit b12cb0e

Please sign in to comment.