diff --git a/.github/workflows/linux-builds-on-master.yaml b/.github/workflows/linux-builds-on-master.yaml index 144ef031646..5775537033d 100644 --- a/.github/workflows/linux-builds-on-master.yaml +++ b/.github/workflows/linux-builds-on-master.yaml @@ -27,6 +27,11 @@ jobs: include: - target: x86_64-unknown-linux-gnu run_tests: YES + snap_arch: amd64 + - target: aarch64-unknown-linux-gnu # skip-pr + snap_arch: arm64 # skip-pr + - target: armv7-unknown-linux-gnueabihf + snap_arch: armhf steps: - uses: actions/checkout@v2 with: @@ -130,6 +135,25 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + - name: Build a snapcraft configuration file + run: | + sh ci/snapcraft.sh + if: matrix.snap_arch != '' + env: + DO_SNAP: 1 + SNAP_ARCH: ${{ matrix.snap_arch }} + SNAP_EDGE: 1 # skip-stable + - uses: jhenstridge/snapcraft-build-action@v1 + id: snapcraftbuild + with: + path: snapcraft + if: matrix.snap_arch != '' + - uses: jhenstridge/snapcraft-publish-action@v1 + with: + store_login: ${{ secrets.SNAPCRAFT_TOKEN }} + snap: ${{ steps.snapcraftbuild.outputs.snap }} + release: edge # skip-pr skip-stable + if: matrix.snap_arch != '' # skip-pr - name: Clear the cargo caches run: | cargo install cargo-cache --no-default-features --features ci-autoclean diff --git a/.github/workflows/linux-builds-on-pr.yaml b/.github/workflows/linux-builds-on-pr.yaml index 4eb2ea0d376..c8ffb478f7f 100644 --- a/.github/workflows/linux-builds-on-pr.yaml +++ b/.github/workflows/linux-builds-on-pr.yaml @@ -22,6 +22,9 @@ jobs: include: - target: x86_64-unknown-linux-gnu run_tests: YES + snap_arch: amd64 + - target: armv7-unknown-linux-gnueabihf + snap_arch: armhf steps: - uses: actions/checkout@v2 with: @@ -125,6 +128,24 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + - name: Build a snapcraft configuration file + run: | + sh ci/snapcraft.sh + if: matrix.snap_arch != '' + env: + DO_SNAP: 1 + SNAP_ARCH: ${{ matrix.snap_arch }} + SNAP_EDGE: 1 # skip-stable + - uses: jhenstridge/snapcraft-build-action@v1 + id: snapcraftbuild + with: + path: snapcraft + if: matrix.snap_arch != '' + - uses: jhenstridge/snapcraft-publish-action@v1 + with: + store_login: ${{ secrets.SNAPCRAFT_TOKEN }} + snap: ${{ steps.snapcraftbuild.outputs.snap }} + if: matrix.snap_arch == 'not-for-prs' # skip-master skip-stable - name: Clear the cargo caches run: | cargo install cargo-cache --no-default-features --features ci-autoclean diff --git a/.github/workflows/linux-builds-on-stable.yaml b/.github/workflows/linux-builds-on-stable.yaml index c3f360d258b..923940dee3f 100644 --- a/.github/workflows/linux-builds-on-stable.yaml +++ b/.github/workflows/linux-builds-on-stable.yaml @@ -41,6 +41,17 @@ jobs: include: - target: x86_64-unknown-linux-gnu run_tests: YES + snap_arch: amd64 + - target: i686-unknown-linux-gnu # skip-pr skip-master + snap_arch: i386 # skip-pr skip-master + - target: aarch64-unknown-linux-gnu # skip-pr + snap_arch: arm64 # skip-pr + - target: armv7-unknown-linux-gnueabihf + snap_arch: armhf + - target: powerpc64le-unknown-linux-gnu # skip-pr skip-master + snap_arch: ppc64el # skip-pr skip-master + - target: s390x-unknown-linux-gnu # skip-pr skip-master + snap_arch: s390x # skip-pr skip-master steps: - uses: actions/checkout@v2 with: @@ -144,6 +155,24 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + - name: Build a snapcraft configuration file + run: | + sh ci/snapcraft.sh + if: matrix.snap_arch != '' + env: + DO_SNAP: 1 + SNAP_ARCH: ${{ matrix.snap_arch }} + - uses: jhenstridge/snapcraft-build-action@v1 + id: snapcraftbuild + with: + path: snapcraft + if: matrix.snap_arch != '' + - uses: jhenstridge/snapcraft-publish-action@v1 + with: + store_login: ${{ secrets.SNAPCRAFT_TOKEN }} + snap: ${{ steps.snapcraftbuild.outputs.snap }} + release: beta # skip-pr skip-master + if: matrix.snap_arch != '' # skip-pr - name: Clear the cargo caches run: | cargo install cargo-cache --no-default-features --features ci-autoclean