diff --git a/.github/workflows/ledger.yml b/.github/workflows/ledger.yml deleted file mode 100644 index f9515009..00000000 --- a/.github/workflows/ledger.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: CI - -on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: - - main - - develop - pull_request: - branches: - - main - - develop - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - scan-build: - name: Clang Static Analyzer - runs-on: ubuntu-latest - - container: - image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - name: Build with Clang Static Analyzer - run: | - scan-build --use-cc=clang -analyze-headers -enable-checker security -enable-checker unix -enable-checker valist -o scan-build --status-bugs make default - - uses: actions/upload-artifact@v2 - if: failure() - with: - name: scan-build - path: scan-build diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b7e0e80..e91290d1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,6 +29,27 @@ jobs: make deps - run: make cpp_test + build_rust: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + - name: Install rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: rustfmt + run: | + cd ./rs + cargo fmt --version + cargo fmt -- --check + - name: audit + run: | + cd ./rs + cargo audit + build_ledger: needs: configure runs-on: ubuntu-latest @@ -160,3 +181,37 @@ jobs: tag_name: ${{ steps.nanosp.outputs.tag_name }} draft: false prerelease: false + + build_package_stax: + needs: [configure, build, build_ledger, test_zemu] + if: ${{ github.ref == 'refs/heads/main' }} + runs-on: ubuntu-latest + container: + image: zondax/ledger-app-builder:latest + options: --user ${{ needs.configure.outputs.uid_gid }} + env: + BOLOS_SDK: /opt/stax-secure-sdk + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + - name: Install deps + run: pip install ledgerblue + + - name: Build Stax + shell: bash -l {0} + run: make SUBSTRATE_PARSER_FULL=1 + - name: Set tag + id: stax + run: echo "tag_name=$(./app/pkg/installer_stax.sh version)" >> $GITHUB_OUTPUT + - name: Update Release + id: update_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_stax.sh + tag_name: ${{ steps.stax.outputs.tag_name }} + draft: false + prerelease: false \ No newline at end of file