diff options
| -rwxr-xr-x | .ci/build.sh | 32 | ||||
| -rw-r--r-- | .github/workflows/build.yml | 17 | ||||
| -rw-r--r-- | .github/workflows/docker-publish.yml | 11 | 
3 files changed, 25 insertions, 35 deletions
diff --git a/.ci/build.sh b/.ci/build.sh deleted file mode 100755 index 0ff94c4..0000000 --- a/.ci/build.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -N=4 -i=0 -TARGETS=( -   # Linux builds -   "linux-arm64-gnuc:aarch64-unknown-linux-gnu" -   "linux-arm64-musl:aarch64-unknown-linux-musl" -   "linux-armv7-gnuc:armv7-unknown-linux-gnueabi" -   "linux-armv7-musl:armv7-unknown-linux-musleabi" -   "linux-86_64-gnuc:x86_64-unknown-linux-gnu" -   "linux-86_64-musl:x86_64-unknown-linux-musl" - -   # windows builds -   "windows-86_64-gnu:x86_64-pc-windows-gnu" -) - -for thing in "${TARGETS[@]}"; do  -   KEY=${thing%%:*} -   VALUE=${thing#*:} -    -   echo "* BUILDING FOR $VALUE" -   cross build --release --target $VALUE - -   # Copy intol folders -   mkdir -p ./build/$KEY/ -   cp target/$VALUE/release/* ./build/$KEY/ - -   rm ./build/$KEY/*.{d,rlib} -done - -wait < <(jobs -p) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d461060..86bc815 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,6 +69,16 @@ jobs:    build_linux:      name: 'Build for Linux'      runs-on: ubuntu-latest +    strategy: +      fail-fast: false +      matrix: +        arch:  +          - aarch64-unknown-linux-gnu +          - aarch64-unknown-linux-musl +          - armv7-unknown-linux-gnueabi +          - armv7-unknown-linux-musleabi +          - x86_64-unknown-linux-gnu +          - x86_64-unknown-linux-musl      steps:        - uses: actions/checkout@v2        - uses: ATiltedTree/setup-rust@v1 @@ -82,12 +92,15 @@ jobs:              ~/.cargo/registry/cache/              ~/.cargo/git/db/              target/ -          key: ${{ runner.os }}-cargo +          key: ${{ runner.os }}-cargo-${{ matrix.arch }}        - name: Build all          run: |            cargo install cross --force            export CROSS_CONTAINER_ENGINE_NO_BUILDKIT=1 -          ./.ci/build.sh +          cross build --release --target ${{ matrix.arch }} +          mkdir -p ./build +          cp target/${{ matrix.arch }}/release/* ./build/ || true +          rm ./build/*.{d,rlib}        - uses: actions/upload-artifact@v3          with:            name: release diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 5c07593..51eaf03 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -11,6 +11,13 @@ env:  jobs:    bake:      runs-on: ubuntu-latest +    strategy: +      fail-fast: false +      matrix: +        arch: +          - linux/amd64 +          - linux/arm64/v8 +          - linux/arm/v7      steps:        - name: Checkout          uses: actions/checkout@v3 @@ -22,7 +29,7 @@ jobs:        - name: Set up Docker Buildx          uses: docker/setup-buildx-action@v2          with: -          platforms: linux/amd64,linux/arm64 +          platforms: linux/amd64,linux/arm64/v8,linux/arm/v7        - name: Log into registry ${{ env.REGISTRY }}          uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c @@ -30,6 +37,7 @@ jobs:            registry: ${{ env.REGISTRY }}            username: ${{ github.actor }}            password: ${{ secrets.GITHUB_TOKEN }} +        - name: Build and push          uses: docker/bake-action@v2          with: @@ -37,3 +45,4 @@ jobs:            set: |              *.cache-from=type=gha              *.cache-to=type=gha,mode=max +            *.platform=${{ matrix.platform }}  | 
