-
Notifications
You must be signed in to change notification settings - Fork 122
Home
Welcome to the pantry wiki!
See the pantry README for up-to-date instructions on getting started packaging.
Now grep it to see if there's something like what you need. For example, if you're building a python package, grep for python.
Also, check out the Packaging Guide and package.yml documentation.
Here is the simplest package.yml file:
distributable:
url: https://example.com/download/{{version}}/src.tar.gz
strip-components: 1
versions:
- 1.0.0
build:
script: |
touch "{{prefix}}"/example
test:
script: |
ls -l
build.script
must install something to "{{prefix}}" or else the build will fail. {{prefix}}
is $TEA_PREFIX/example.com/v1.0.0
.
If your package grabs version information from GitHub you’ll need a PAT.
Either ensure GITHUB_TOKEN
is set in your environment or gh auth login
first.
cd pantry
pkg build # `tea pkg build` if you have no magic installed
- Downloads the
distributable
to./srcs
- Builds the srcs to
./builds
- Builds run via a script called
pkg.com+platform/xyz.tea.build.sh
- Successive runs of
pkg build
do not clean first!†
- Builds run via a script called
- You can use docker to run the build on Linux with
pkg -L build
† We do this because it usually makes the successive builds faster and it makes debugging builds easier.
- Usually it's easiest to just edit the
package.yml
and re-runpkg build
- However you can step into the
./builds/pkg.com+platform
and:- edit
xyz.tea.build.sh
and run it yourself - try out build commands yourself, eg.
./configure --help
- edit
TIP: If you need to create the env of the pkg then step into the build directory, edit the build script and remove everything but the
export
commands, then source it (source xyz.tea.build.sh
)
Our CI/CD infra requires a test
YAML node. This script should thoroughly verify all
the functionality of the package is working. You can run the test with:
pkg test
Push and create a pull request.
Our CI/CD will build and test on all platforms we support.
We prefer you make the package work on all platforms but if it doesn’t we’ll merge whatever works. Someone else can make it work when they want that platform.
We require all packages be relocatable.
Our CI will verify this for you. You can check locally by moving the installation from
~/.tea
to another tea installation (eg. ~/scratch/tea
§ and running the
test again.
§
TEA_PREFIX=~/scratch/tea sh <(curl tea.xyz)
We build “bottles” (tar’d binaries) and upload them to both our centralized bottle storage and decentralized [IPFS].
tea automatically builds new releases of packages as soon as they are released (usually starting the builds within seconds). There is no need to submit PRs for updates.
^^ Guides for specific build tools and scenarios
- Resources — links to outside sources that help
- Troubleshooting