mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-06 11:35:25 +00:00
fix(ci): fix aarch64 debian builds (#426)
This commit is contained in:
parent
2d74a3465a
commit
05e3ba3b75
11
.github/workflows/cd.yml
vendored
11
.github/workflows/cd.yml
vendored
@ -253,16 +253,19 @@ jobs:
|
||||
- name: Build release binary
|
||||
shell: bash
|
||||
run: |
|
||||
# if aarch64-unknown-linux-gnu, we need to install the cross compiler
|
||||
if [[ ${{ matrix.target }} == aarch64-unknown-linux-gnu ]]; then
|
||||
sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu
|
||||
fi
|
||||
version="${{ github.ref_name }}"
|
||||
DEB_NAME="tv-$version-${{ matrix.target }}.deb"
|
||||
DEB_DIR="target/${{ matrix.target }}/debian"
|
||||
|
||||
# Build the actual binary
|
||||
# if aarch64, we need to install the cross compiler since we're running x86_64
|
||||
if [[ ${{ matrix.target }} == aarch64-unknown-linux-gnu ]]; then
|
||||
sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu
|
||||
cargo deb --profile deb --target ${{ matrix.target }} -o "$DEB_DIR/$DEB_NAME" -- --no-default-features --features zero-copy,simd,fancy
|
||||
else
|
||||
cargo deb --profile deb --target ${{ matrix.target }} -o "$DEB_DIR/$DEB_NAME"
|
||||
fi
|
||||
|
||||
echo "DEB_DIR=$DEB_DIR" >> $GITHUB_ENV
|
||||
echo "DEB_NAME=$DEB_NAME" >> $GITHUB_ENV
|
||||
|
||||
|
20
Cargo.toml
20
Cargo.toml
@ -64,10 +64,18 @@ syntect = { package = "syntect", version = "5.2", default-features = false }
|
||||
bat = { package = "bat", version = "0.25", default-features = false }
|
||||
|
||||
|
||||
# target specific dependencies
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { version = "0.28.1", features = ["serde", "use-dev-tty"] }
|
||||
|
||||
[target.'cfg(not(target_os = "macos"))'.dependencies]
|
||||
crossterm = { version = "0.28", features = ["serde"] }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi-util = "0.1.9"
|
||||
clipboard-win = "5.4.0"
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = { version = "0.5", features = ["async_tokio"] }
|
||||
tempfile = "3.16.0"
|
||||
@ -75,16 +83,11 @@ tempfile = "3.16.0"
|
||||
[features]
|
||||
simd = ["dep:simdutf8"]
|
||||
zero-copy = []
|
||||
default = ["zero-copy", "simd", "onig"]
|
||||
# Use fancy-regex for aarch64 Linux
|
||||
fancy = ["syntect/regex-fancy", "bat/regex-fancy"]
|
||||
# Use oniguruma for other platforms
|
||||
onig = ["syntect/regex-onig", "bat/regex-onig"]
|
||||
|
||||
|
||||
# Use `fancy-regex` instead of `oniguruma` on aarch64 Linux (build problems)
|
||||
[target.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.features]
|
||||
default = ["fancy"]
|
||||
default = ["zero-copy", "simd", "onig"]
|
||||
|
||||
|
||||
[build-dependencies]
|
||||
@ -101,11 +104,6 @@ name = "tv"
|
||||
name = "main"
|
||||
harness = false
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { version = "0.28.1", features = ["serde", "use-dev-tty"] }
|
||||
|
||||
[target.'cfg(not(target_os = "macos"))'.dependencies]
|
||||
crossterm = { version = "0.28", features = ["serde"] }
|
||||
|
||||
[profile.staging]
|
||||
inherits = "dev"
|
||||
|
Loading…
x
Reference in New Issue
Block a user