mirror of
https://github.com/miyu0-bit/frameeye-helper.git
synced 2026-10-06 05:00:27 +02:00
first version
This commit is contained in:
commit
3d43bfe5ca
47 files changed
+25167
No files matched your search
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds FrameEye Helper for Windows (x86_64, .exe) and Linux inside the frameeye-build container,
|
||||
# runs the unit tests, and copies the results to dist/.
|
||||
# build/build-helper.sh (from the project root, or anywhere)
|
||||
set -euo pipefail
|
||||
root="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
image=frameeye-build
|
||||
if ! podman image exists "$image"; then
|
||||
podman build -t "$image" -f "$root/build/Containerfile" "$root/build"
|
||||
fi
|
||||
mkdir -p "$root/build/cargo-home" "$root/dist"
|
||||
podman run --rm --userns=keep-id \
|
||||
-v "$root/helper:/src:Z" \
|
||||
-v "$root/build/cargo-home:/cargo-home:Z" \
|
||||
-e CARGO_TARGET_DIR=/src/target-container \
|
||||
"$image" bash -c '
|
||||
set -euo pipefail
|
||||
cargo test --release --locked
|
||||
cargo build --release --locked --target x86_64-unknown-linux-gnu
|
||||
cargo build --release --locked --target x86_64-pc-windows-gnu
|
||||
'
|
||||
cp "$root/helper/target-container/x86_64-pc-windows-gnu/release/FrameEyeHelper.exe" "$root/dist/FrameEyeHelper.exe"
|
||||
cp "$root/helper/target-container/x86_64-unknown-linux-gnu/release/FrameEyeHelper" "$root/dist/FrameEyeHelper-linux"
|
||||
ls -la "$root/dist"
|
||||
Reference in new issue
Block a user