[config] skip_core_tasks = true [tasks.create-target-dir] script_runner = "@duckscript" script = [ "mkdir ./target/" ] [tasks.assemble] dependencies = ["create-target-dir"] command = "arm-none-eabi-as" args = ["crt0.s", "-o", "target/crt0.o"] [tasks.build-examples-debug] dependencies = ["assemble"] command = "cargo" args = ["build", "--examples"] [tasks.build-examples-release] dependencies = ["assemble"] command = "cargo" args = ["build", "--examples", "--release"] [tasks.pack-roms] script_runner = "@duckscript" script = [ ''' examples = glob_array ./examples/*.rs for example in ${examples} example = substring ${example} -3 example = basename ${example} exec arm-none-eabi-objcopy -O binary ./target/thumbv4-none-agb/release/examples/${example} ./target/${example}.gba end ''' ] [tasks.test.linux] command = "cargo" args = ["test", "--lib", "--target", "x86_64-unknown-linux-gnu", "-Z", "build-std"] [tasks.test.windows] command = "cargo" args = ["test", "--lib", "--target", "x86_64-pc-windows-msvc", "-Z", "build-std"] [tasks.test.mac] command = "cargo" args = ["test", "--lib", "--target", "x86_64-apple-darwin", "-Z", "build-std"] [tasks.justrelease] dependencies = ["build-examples-release", "pack-roms"] [tasks.build-all] dependencies = ["build-examples-debug", "build-examples-release", "pack-roms"] [tasks.default] alias = "build-all"