Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests failing on M1 env in CI #24

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[target.x86_64-apple-darwin]
rustflags = [
"-C",
"link-arg=-undefined",
"-C",
"link-arg=dynamic_lookup",
]

[target.aarch64-apple-darwin]
rustflags = [
"-C",
"link-arg=-undefined",
"-C",
"link-arg=dynamic_lookup",
]
43 changes: 36 additions & 7 deletions .github/workflows/mean_bean_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- uses: actions/checkout@v1
with:
depth: 50
fetch-depth: 50
- uses: XAMPPRocky/get-github-release@v1
id: cross
with:
Expand All @@ -34,7 +34,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
depth: 50
fetch-depth: 50
- run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}
shell: bash
- run: ci/build.bash cargo ${{ matrix.target }}
Expand All @@ -56,17 +56,14 @@ jobs:
# - i686-pc-windows-gnu
# - x86_64-pc-windows-gnu

macos:
macos_x64:
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
channel: [stable, beta, nightly]
target:
- x86_64-apple-darwin
### Disable running tests on M1 target, not currently working
###
#- aarch64-apple-darwin
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
Expand All @@ -89,13 +86,45 @@ jobs:
command: test
args: --target ${{ matrix.target }}
use-cross: false

macos_arm:
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
channel: [stable, beta, nightly]
target:
- aarch64-apple-darwin
steps:
- name: Setup | Checkout
uses: actions/checkout@v2

- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal
target: ${{ matrix.target }}

- run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}

- name: Test
uses: actions-rs/cargo@v1
env:
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
with:
command: test
args: --target ${{ matrix.target }}
use-cross: false

linux:
runs-on: ubuntu-latest
needs: install-cross
steps:
- uses: actions/checkout@v2
with:
depth: 50
fetch-depth: 50

- name: Download Cross
uses: actions/download-artifact@v1
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/mean_bean_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v1
with:
depth: 50
fetch-depth: 50
- uses: XAMPPRocky/get-github-release@v1
id: cross
with:
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ matrix.target }}

- name: Setup | Rust
uses: actions-rs/toolchain@v1
Expand All @@ -128,7 +128,6 @@ jobs:
with:
command: build
args: --release --target ${{ matrix.target }}
use-cross: ${{ matrix.os == 'ubuntu-latest' }}

- run: tar -czvf ${{ env.BIN }}.tar.gz --directory=target/${{ matrix.target }}/release ${{ env.BIN }}
- uses: XAMPPRocky/[email protected]
Expand Down