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

Try to fix compilation issues on cross targets #1

Merged
merged 14 commits into from
Aug 19, 2024
Merged
38 changes: 23 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Rust Cache
uses: Swatinem/[email protected]

- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
Expand All @@ -33,6 +36,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Rust Cache
uses: Swatinem/[email protected]

- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
Expand All @@ -49,7 +55,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
- name: Rust Cache
uses: Swatinem/[email protected]

- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt

Expand All @@ -68,31 +77,30 @@ jobs:
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-musl
target: x86_64-unknown-linux-gnu

#- build: macos
#- build: macos_x86_64
# os: macos-latest
# target: x86_64-apple-darwin

#- build: windows-gnu
# os: windows-latest
# target: x86_64-pc-windows-gnu
- build: macos_arm64
os: macos-latest
target: arm64e-apple-darwin

- build: windows-gnu
os: ubuntu-latest
target: x86_64-pc-windows-gnu

steps:
- uses: actions/checkout@v4


- name: Rust Cache
uses: Swatinem/[email protected]

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Install ssl
shell: bash
run: |
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
sudo apt update
sudo apt install libssl-dev -y
fi

- name: Build
uses: actions-rs/cargo@v1
with:
Expand Down
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ features = [
"fast-rng", # Use a faster (but still sufficiently random) RNG
"macro-diagnostics", # Enable better diagnostics for compile-time UUIDs
]

[package.metadata.cross.target.x86_64-unknown-linux-gnu]
pre-build = [
"apt-get update && apt-get install --assume-yes libssl-dev"
]


Loading