-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
watcher/python, watcher/cross
Will
committed
Jul 14, 2024
1 parent
6041503
commit 585c0ef
Showing
11 changed files
with
94 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: libcwatcher-cross | ||
|
||
on: | ||
push: | ||
branches: [ release, next ] | ||
pull_request: | ||
branches: [ release, next ] | ||
|
||
jobs: | ||
build-all: | ||
runs-on: macos-14 | ||
strategy: | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: | | ||
which meson || brew install meson | ||
- run: | | ||
libcwatcher/cross-compile.sh | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: libcwatcher/out |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#! /usr/bin/env bash | ||
set -e | ||
[ -d "$(dirname "$0")/out" ] || mkdir "$(dirname "$0")/out" | ||
cd "$(dirname "$0")" | ||
linux-cross-compilation-containers/build-containers.sh | ||
[ -f out/meson.build ] || cp meson.build out | ||
[ -d out/src ] || cp -r src out | ||
[ -d out/include ] || cp -r include out | ||
( | ||
cd out | ||
SRC=$PWD | ||
docker run --platform linux/amd64 --rm -v "$SRC:/src" meson-builder-x86_64-unknown-linux-gnu:latest | ||
docker run --platform linux/arm64 --rm -v "$SRC:/src" meson-builder-aarch64-unknown-linux-gnu:latest | ||
docker run --platform linux/arm/v7 --rm -v "$SRC:/src" meson-builder-armv7-unknown-linux-gnueabihf:latest | ||
) | ||
[ "$(uname)" = Darwin ] && { | ||
[ -d out/x86_64-apple-darwin ] || meson setup --cross-file cross-files/x86_64-apple-darwin.txt out/x86_64-apple-darwin | ||
[ -d out/aarch64-apple-darwin ] || meson setup --cross-file cross-files/aarch64-apple-darwin.txt out/aarch64-apple-darwin | ||
meson compile -C out/x86_64-apple-darwin | ||
meson compile -C out/aarch64-apple-darwin | ||
} | ||
for pattern in '*.a' '*.so' '*.dylib' | ||
do find out -type f -name "$pattern" -exec file {} \; | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM debian:latest | ||
ARG BUILD_DIR | ||
RUN apt-get update -yqq && apt-get install -yqq build-essential meson ninja-build | ||
COPY build.sh /usr/local/bin/build.sh | ||
ENV BUILD_DIR=$BUILD_DIR | ||
ENTRYPOINT ["build.sh"] |
6 changes: 6 additions & 0 deletions
6
libcwatcher/linux-cross-compilation-containers/build-containers.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /usr/bin/env bash | ||
set -e | ||
cd "$(dirname "$0")" | ||
docker build -t meson-builder-x86_64-unknown-linux-gnu --build-arg BUILD_DIR=x86_64-unknown-linux-gnu --platform linux/amd64 . | ||
docker build -t meson-builder-aarch64-unknown-linux-gnu --build-arg BUILD_DIR=aarch64-unknown-linux-gnu --platform linux/arm64 . | ||
docker build -t meson-builder-armv7-unknown-linux-gnueabihf --build-arg BUILD_DIR=armv7-unknown-linux-gnueabihf --platform linux/arm/v7 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! /usr/bin/env sh | ||
set -e | ||
cd /src | ||
[ -d "$BUILD_DIR" ] || meson setup "$BUILD_DIR" | ||
meson compile -C "$BUILD_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters