name: build-workflow on: push: branches: [ main, 'release-*' ] workflow_dispatch: env: CARGO_TERM_COLOR: always RUSTFLAGS: -D warnings jobs: build-amd64: name: Build for amd64 runs-on: Ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v3 - name: Enable toolchain via github action # https://github.com/actions-rs/toolchain uses: actions-rs/toolchain@v1 with: toolchain: 1.58.1 override: true - name: Enable cache # https://github.com/marketplace/actions/rust-cache uses: Swatinem/rust-cache@v1 - name: Build packages for amd64 run: ./ci/build_scripts/build_for_amd64.sh - name: Upload artifacts as zip # https://github.com/marketplace/actions/upload-a-build-artifact uses: actions/upload-artifact@v2 with: name: debian-packages-amd64 path: target/debian/*.deb build-arm-matrix: name: Build for ${{ matrix.target }} runs-on: Ubuntu-20.04 strategy: matrix: # Add only arm targets here as we use a custom strip binary! target: [ aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl, arm-unknown-linux-gnueabihf, armv7-unknown-linux-gnueabihf, armv7-unknown-linux-musleabihf, ] steps: - name: Checkout uses: actions/checkout@v3 - name: Enable toolchain via github action # https://github.com/actions-rs/toolchain uses: actions-rs/toolchain@v1 with: toolchain: 1.58.1 target: ${{ matrix.target }} override: true - name: Enable cache # https://github.com/marketplace/actions/rust-cache uses: Swatinem/rust-cache@v1 - name: Build for ${{ matrix.target }} run: ./ci/build_scripts/build_for_arm.sh ${{ matrix.target }} - name: Upload debian packages as zip # https://github.com/marketplace/actions/upload-a-build-artifact uses: actions/upload-artifact@v2 with: name: debian-packages-${{ matrix.target }} path: target/${{ matrix.target }}/debian/*.deb - name: Upload sawtooth publisher as zip # https://github.com/marketplace/actions/upload-a-build-artifact uses: actions/upload-artifact@v2 with: name: sawtooth_publisher_${{ matrix.target }} path: target/${{ matrix.target }}/release/sawtooth_publisher - name: Upload dummy-plugin as zip # https://github.com/marketplace/actions/upload-a-build-artifact uses: actions/upload-artifact@v2 with: name: tedge_dummy_plugin_${{ matrix.target }} path: target/${{ matrix.target }}/release/tedge_dummy_plugin