From 58862d337b2cf63ac5205925fb86a8e2d7bcce03 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Fri, 12 Jul 2024 06:34:25 -0400 Subject: [PATCH] fix docker build to use NPM --- .github/workflows/ci.yml | 3 ++- Cross.toml | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 Cross.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9175346f6..1d8b60025 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,8 +144,9 @@ jobs: echo "Building $target" export "CARGO_TARGET_$(echo $target | tr 'a-z-' 'A-Z_')_RUSTFLAGS"='-C strip=debuginfo' - cross build --release --target $target --package mbtiles cross build --release --target $target --package martin + cross build --release --target $target --package martin-cp + cross build --release --target $target --package mbtiles mkdir -p target_releases/$target mv target/$target/release/martin target_releases/$target diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 000000000..0c7689911 --- /dev/null +++ b/Cross.toml @@ -0,0 +1,9 @@ +[build] +pre-build = [ + # install nodejs and npm to compile static web resources + # note that architecture could be the same as the container, not $CROSS_DEB_ARCH + "curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh", + "bash nodesource_setup.sh", + "apt-get install -y nodejs", + "node -v", +]