triggers:
  - action: email
    condition: always
    to: syd-devel <~alip/syd-devel@lists.sr.ht>
image: debian/sid
arch: arm64
artifacts:
  - syd-git-arm64-debian.tar.xz
packages:
- autoconf
- automake
- build-essential
- cpanminus
- file
- golang
- gperf
- libcap-dev
- libio-socket-ssl-perl
- libtool
- linux-perf
- musl
- openssl
- pkg-config
- ruby
- ruby-ffi
- socat
- strace
- valgrind
sources:
- https://git.sr.ht/~alip/syd
tasks:
- init: |
    uname -a
- scmp: |
    cd syd
    sudo dev/install_libseccomp.sh -i /usr -v main
- perl: |
    sudo cpanm -n FFI::Platypus JSON
- rust: |
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
    chmod +x rustup.sh
    ./rustup.sh --profile minimal -y
    source ~/.cargo/env
    rustc --version
    rustc --print cfg
- make: |
    source ~/.cargo/env
    cd syd
    sed -i -e '/^codegen-units/d' Cargo.toml
    sed -i -e '/^lto/s/=.*$/= "off"/' Cargo.toml
    make release
- libc: |
    source ~/.cargo/env
    cd syd
    make lib
- tar: |
    tag=$(cd syd; git describe)
    mkdir syd-$tag
    for bin in $(find syd/target/release -mindepth 1 -maxdepth 1 -type f -executable -name 'syd*'); do chmod 755 $bin; mv $bin syd-$tag; done
    mv syd/pandora/target/release/pandora syd-$tag
    tar --owner=0 --group=0 -cJvpf syd-git-arm64-debian.tar.xz ./syd-$tag
