# task intended to run on remote only [tasks.build_all] info = "build all" script = [ # install packages "apt update --color always", "apt install zip mingw-w64 -y --color always", "mkdir build", # build linux (x86_64) "cargo zigbuild -r -p maid --color always", "mv target/release/maid build/maid", "zip build/maid_%{env.VERSION}_linux_amd64.zip build/maid", "rm build/maid", # build windows (x86_64) "cargo zigbuild -r -p maid --target x86_64-pc-windows-gnu --color always", "mv target/x86_64-pc-windows-gnu/release/maid.exe build/maid.exe", "zip build/maid_%{env.VERSION}_windows_amd64.zip build/maid.exe", "rm build/maid.exe", # build macos (x86_64) "cargo zigbuild -r -p maid --target x86_64-apple-darwin --color always", "mv target/x86_64-apple-darwin/release/maid build/maid", "zip build/maid_%{env.VERSION}_darwin_amd64.zip build/maid", "rm build/maid", # build macos (aarch64) "cargo zigbuild -r -p maid --target aarch64-apple-darwin --color always", "mv target/aarch64-apple-darwin/release/maid build/maid", "zip build/maid_%{env.VERSION}_darwin_arm.zip build/maid", "rm build/maid", # post build "ls -sh build", ] [tasks.build_all.remote] silent = false exclusive = true shell = "/bin/bash" image = "themackabu/rust:zigbuild-1.74.0" push = ["crates", "Cargo.toml", "Cargo.lock"] pull = "build"