Skip to content

Commit

Permalink
Try different builder method
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyGiorgio committed Nov 30, 2024
1 parent 9a3a340 commit f7941f3
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,43 +49,36 @@ jobs:
run: cargo clippy --all-targets

build:
name: Build Release (${{ matrix.target }})
runs-on: ubuntu-latest
name: Build Release (${{ matrix.runner }})
needs: test-and-lint
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
- runner: ubuntu-latest
artifact_name: ghost-resend-mailer-x86_64-linux
platform: linux/amd64
- target: aarch64-unknown-linux-gnu
- runner: ubuntu-latest-arm64
artifact_name: ghost-resend-mailer-aarch64-linux
platform: linux/arm64
runs-on: ${{ matrix.runner }}

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.78.0

- name: Create builder container
run: |
docker buildx create --name multiarch-builder --driver docker-container --bootstrap
docker buildx use multiarch-builder
- name: Build in Docker
- name: Install dependencies
run: |
docker buildx build --platform ${{ matrix.platform }} \
--build-arg RUST_TARGET=${{ matrix.target }} \
--output type=local,dest=./output \
-f .github/workflows/build.Dockerfile .
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev
- name: Build release
run: cargo build --release

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: output/ghost-resend-mailer
path: target/release/ghost-resend-mailer
retention-days: 7

0 comments on commit f7941f3

Please sign in to comment.