diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..6387b2b --- /dev/null +++ b/.cargo/config.toml @@ -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", +] diff --git a/.github/workflows/mean_bean_ci.yml b/.github/workflows/mean_bean_ci.yml index 4192e7a..3cc9384 100644 --- a/.github/workflows/mean_bean_ci.yml +++ b/.github/workflows/mean_bean_ci.yml @@ -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: @@ -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 }} @@ -56,7 +56,7 @@ jobs: # - i686-pc-windows-gnu # - x86_64-pc-windows-gnu - macos: + macos_x64: runs-on: macos-latest strategy: fail-fast: true @@ -64,9 +64,6 @@ jobs: 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 @@ -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 diff --git a/.github/workflows/mean_bean_deploy.yml b/.github/workflows/mean_bean_deploy.yml index f168d15..b4db146 100644 --- a/.github/workflows/mean_bean_deploy.yml +++ b/.github/workflows/mean_bean_deploy.yml @@ -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: @@ -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 @@ -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/create-release@v1.0.2