Skip to content

Commit

Permalink
Add tests to cross-build script
Browse files Browse the repository at this point in the history
  • Loading branch information
joaofl committed Aug 22, 2024
1 parent ba30958 commit 279cb79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cross.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build]
default-target = "x86_64-unknown-linux-gnu" # use this target if none is explicitly provided
pre-build = [ # additional commands to run prior to building the package
"apt-get update && apt-get --assume-yes install nasm build-essential clang wget tftp curl"
"apt-get update && apt-get --assume-yes install nasm build-essential clang wget tftp-hpa curl"
]
7 changes: 5 additions & 2 deletions cross-build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ for target in "${TARGETS[@]}"; do
cross build --release --target "$target"
done

# Test natively
cross test --release

# Copy the compiled files
for target in "${TARGETS[@]}"; do
ext=""
if [ $target = "x86_64-pc-windows-gnu" ]; then
ext=".exe"
fi

cp -vf target/${target}/release/quick-serve-gui${ext} target/assets/quick-serve-gui-${target}${ext} || true
cp -vf target/${target}/release/quick-serve${ext} target/assets/quick-serve-${target}${ext} || true
cp -vf target/${target}/release/quick-serve-gui${ext} target/assets/quick-serve-gui-${target}${ext} || true
cp -vf target/${target}/release/quick-serve${ext} target/assets/quick-serve-${target}${ext} || true
done

exit 0

0 comments on commit 279cb79

Please sign in to comment.