Skip to content

Commit

Permalink
Add cross.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode committed Jul 6, 2024
1 parent 91055d2 commit 47bf5f8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ jobs:

- name: Build (Linux)
if: runner.os == 'Linux'
uses: clechasseur/rs-cargo@v2
with:
use-cross: true
command: build
args: --release --target ${{ matrix.target }}
run: cross build --release --target ${{ matrix.target }}

- name: Build Release (macOS)
if: runner.os == 'macOS'
Expand Down
10 changes: 0 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,3 @@ opt-level = 2

[profile.dev.package.libsamplerate]
opt-level = 2

[workspace.metadata.cross.target]
image = "ghcr.io/cross-rs/{{TARGET}}:edge"
pre-build = ["""
dpkg --add-architecture $CROSS_DEB_ARCH && \
apt-get update && apt-get --assume-yes install \
libgtk-3-dev:$CROSS_DEB_ARCH \
libssl-dev:$CROSS_DEB_ARCH \
libasound2-dev:$CROSS_DEB_ARCH
"""]
14 changes: 14 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[build]
pre-build = ["""
dpkg --add-architecture $CROSS_DEB_ARCH && \
apt-get update && apt-get --assume-yes install \
libgtk-3-dev:$CROSS_DEB_ARCH \
libssl-dev:$CROSS_DEB_ARCH \
libasound2-dev:$CROSS_DEB_ARCH
"""]

[target.x86_64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:edge"

[target.aarch64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:edge"

0 comments on commit 47bf5f8

Please sign in to comment.