Skip to content

Instantly share code, notes, and snippets.

@bollwyvl
Last active April 8, 2024 13:13
Show Gist options
  • Save bollwyvl/62a2d42a54a8359a9433fdd6971a4dcb to your computer and use it in GitHub Desktop.
Save bollwyvl/62a2d42a54a8359a9433fdd6971a4dcb to your computer and use it in GitHub Desktop.
[project]
name = "foo"
channels = ["conda-forge"]
platforms = ["linux-64"]
[dependencies]
sqlite = "*"
[tasks.preflight]
inputs = ["pixi.toml"]
outputs = ["build/preflight.txt", "build/preflight.txt"]
cmd = """
mkdir -p build
&& cd build
&& echo "$(date) preflight" > preflight.txt
&& echo "$(date) preflight extra" > preflight-extra.txt
"""
[tasks.build]
depends_on = ["preflight"]
inputs = ["build/preflight.txt"]
outputs = ["build/built.txt"]
cwd = "build"
cmd = """
cat preflight.txt > built.txt
&& sleep 1
&& echo "$(date) built" >> built.txt
"""
[tasks.test]
depends_on = ["build"]
inputs = ["build/built.txt"]
outputs = ["build/test.txt"]
cwd = "build"
cmd = """
rm -f test.txt
&& cat built.txt > test.txt
&& sleep 1
&& echo "$(date) tested" >> test.txt
"""
[tasks.clean]
cmd = ["rm", "-rf", "build"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment