Skip to content

Commit

Permalink
chore: cleanup workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkeil committed May 28, 2024
1 parent 640aa08 commit 8c7adb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,41 +60,38 @@ jobs:
- name: Linux arm64
target: aarch64-unknown-linux-gnu
runner: ubuntu-latest
docker-image: "rust:latest"
docker-platform: "linux/arm64"
use-docker: true
- name: Windows x86
target: x86_64-pc-windows-msvc
runner: windows-latest
# - name: Windows arm64
# target: aarch64-pc-windows-msvc
# runner: windows-latest
# docker-image: "rust:latest"
# docker-platform: "linux/arm64"
# use-docker: true
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up QEMU
if: ${{ matrix.settings.docker-image != '' }}
if: ${{ matrix.settings.use-docker && matrix.settings.runner == 'ubuntu-latest' }}
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Build in docker
if: ${{ matrix.settings.docker-image != '' }}
if: ${{ matrix.settings.use-docker }}
run: |
docker buildx build \
--build-arg IMAGE="${{ matrix.settings.docker-image }}" \
--build-arg TARGET="${{ matrix.settings.target }}" \
--platform ${{ matrix.settings.docker-platform }} \
-t aarch64-unknown-linux-gnu \
--build-arg TARGET=${{ matrix.settings.target }} \
--platform linux/arm64 \
-t ${{ matrix.settings.target }} \
.
- name: install rustup
if: ${{ !matrix.settings.docker-image }}
if: ${{ !matrix.settings.use-docker }}
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
sh rustup-init.sh -y --default-toolchain none
rustup target add ${{ matrix.settings.target }}
- name: Build and Test
if: ${{ !matrix.settings.docker-image }}
if: ${{ !matrix.settings.use-docker }}
run: |
cargo build --release --target ${{ matrix.settings.target }}
cargo test --target ${{ matrix.settings.target }}
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
ARG IMAGE

FROM $IMAGE
FROM rust:latest

ARG TARGET

Expand Down

0 comments on commit 8c7adb5

Please sign in to comment.