--- name: build-arm # Trigger the workflow on push or pull request on: push: branches: - '*' tags: - '*' pull_request: jobs: build_job: runs-on: ubuntu-20.04 name: linux_${{ matrix.arch }} strategy: matrix: include: - arch: armv7 go: 1.17.5 go_arch: armv6l - arch: aarch64 go: 1.17.5 go_arch: arm64 steps: - uses: actions/checkout@v3 name: Checkout with: fetch-depth: 0 - uses: uraimo/run-on-arch-action@v2.1.2 name: Test and Build id: runcmd with: arch: ${{ matrix.arch }} distro: ubuntu20.04 githubToken: ${{ github.token }} setup: | mkdir -p "/tmp/artifacts" dockerRunArgs: | --volume "/tmp/artifacts:/artifacts" install: | apt update apt install -y fuse libfuse-dev rpm pkg-config curl git make gcc g++ apt upgrade -y run: | export PATH=$PATH:/usr/local/go/bin rm -rf /usr/local/go mkdir -p /usr/local/go curl -s -L https://golang.org/dl/go${{ matrix.go }}.linux-${{ matrix.go_arch }}.tar.gz | tar -C /usr/local -xz go version make test make build cp bin/* /artifacts - name: Show artifacts run: | ls -al "/tmp/artifacts" - name: Upload artifacts uses: actions/upload-artifact@v2 with: if-no-files-found: error name: build-${{ matrix.arch }} path: "/tmp/artifacts/*" - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: files: "/tmp/artifacts/*"