Skip to content

Commit

Permalink
ci: add cross prebuild commands for zlib
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhall88 committed Nov 25, 2024
1 parent a679c9e commit 281bfb1
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
job:
- { os: ubuntu-latest, target: x86_64-unknown-linux-musl, use-cross: true }
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu, use-cross: true }
- { os: ubuntu-latest, target: aarch64-unknown-linux-gnu, use-cross: true }
- { os: ubuntu-latest, target: aarch64-unknown-linux-musl, use-cross: true }
- { os: macos-latest, target: x86_64-apple-darwin, use-cross: true }
- { os: macOS-latest, target: aarch64-apple-darwin, use-cross: true }
Expand Down
51 changes: 51 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[target.aarch64-unknown-linux-gnu]
# Additional commands to run prior to building the package.
# These override the commands present in `[build]`: they
# will not merge.
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y zlib1g-dev:$CROSS_DEB_ARCH",
]

[target.x86_64-unknown-linux-gnu]
# Additional commands to run prior to building the package.
# These override the commands present in `[build]`: they
# will not merge.
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y zlib1g-dev:$CROSS_DEB_ARCH",
]

[target.aarch64-unknown-linux-musl]
# Additional commands to run prior to building the package.
# These override the commands present in `[build]`: they
# will not merge.
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y musl-tools musl-dev zlib1g-dev:$CROSS_DEB_ARCH",
]

[target.x86_64-unknown-linux-musl]
# Additional commands to run prior to building the package.
# These override the commands present in `[build]`: they
# will not merge.
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y musl-tools musl-dev zlib1g-dev:$CROSS_DEB_ARCH",
]

[target.x86_64-apple-darwin]
# Additional commands to run prior to building the package.
# These override the commands present in `[build]`: they
# will not merge.
pre-build = [
"brew install zlib",
]

[target.aarch64-apple-darwin]
# Additional commands to run prior to building the package.
# These override the commands present in `[build]`: they
# will not merge.
pre-build = [
"brew install zlib",
]

0 comments on commit 281bfb1

Please sign in to comment.