Skip to content

Commit

Permalink
Checkout v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ogxd committed Dec 24, 2023
1 parent ab32728 commit 16c90ee
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 42 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ jobs:
image: i386/ubuntu:latest

steps:
- uses: actions/checkout@v3
# actions/checkout@v3 doesn't work in a i386 container: the GitHub runner
# uses `node` that is installed on the host inside the container. The host
# is (likely) running x86_64 and using a binary build for x86_64 inside a
# i386 container just doesn't work.
- uses: actions/checkout@v1

- name: Build
run: cargo build --release
Expand Down
82 changes: 41 additions & 41 deletions .github/workflows/qemu.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Cross-Architecture Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test:
strategy:
matrix:
include:
- arch: amd64
qemu_arch: x86_64
- arch: arm64v8
qemu_arch: aarch64
- arch: i386
qemu_arch: i386

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: ${{ matrix.qemu_arch }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Available platforms
run: echo ${{ steps.qemu.outputs.platforms }}

- name: Run cargo test
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp ${{ matrix.arch }}/rust cargo test
# name: Cross-Architecture Test

# on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]

# jobs:
# test:
# strategy:
# matrix:
# include:
# - arch: amd64
# qemu_arch: x86_64
# - arch: arm64v8
# qemu_arch: aarch64
# - arch: i386
# qemu_arch: i386

# runs-on: ubuntu-latest

# steps:
# - name: Checkout repository
# uses: actions/checkout@v2

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
# with:
# platforms: ${{ matrix.qemu_arch }}

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1

# - name: Available platforms
# run: echo ${{ steps.qemu.outputs.platforms }}

# - name: Run cargo test
# run: |
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp ${{ matrix.arch }}/rust cargo test

0 comments on commit 16c90ee

Please sign in to comment.