triggers:
  - action: email
    condition: always
    to: syd-devel <~alip/syd-devel@lists.sr.ht>
image: fedora/latest
arch: x86_64
packages:
- attr
- autoconf
- automake
- awk
- codespell
- diffutils
- e2fsprogs
- glibc-static
- gperf
- jq
- libcap-devel
- libgcc
- libstdc++-devel
- libtool
- openssl
- openssl-devel
- perl
- perl-IO-Socket-SSL
- python
- socat
- strace
- tar
- valgrind
- wget
- xz
- zip
sources:
- https://git.sr.ht/~alip/syd
tasks:
- hack: |
    sudo dnf update -y libgcc libstdc++-devel gcc-c++ glibc-devel binutils
    sudo dnf install -y libgcc.i686 libstdc++-devel.i686 gcc-c++.i686 glibc-devel.i686 binutils.i686
- init: |
    uname -a
- spell: |
    cd syd
    make spell
- scmp: |
    cd syd
    sudo dev/install_libseccomp.sh -i /usr -v main
- rust: |
    umask 077
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
    chmod +x rustup.sh
    ./rustup.sh --profile minimal -y
    source ~/.cargo/env
    rustup target add i686-unknown-linux-gnu
    rustc --version
    rustc --print cfg
- make: |
    umask 077
    source ~/.cargo/env
    cd syd
    sed -i -e '/^lto/s/=.*$/= "off"/' Cargo.toml
    make CARGOFEATS=trusted release
- chk: |
    source ~/.cargo/env
    TARGET=$(rustc --print=host-tuple)
    syd/target/${TARGET}/release/syd --check
- ltp64: |
    umask 077
    source ~/.cargo/env
    TARGET=$(rustc --print=host-tuple)
    env SYD_TEST_DMESG=1 PATH="${PWD}/syd/target/${TARGET}/release:${PATH}" ./syd/dev/ltp-test.sh
- ltp32: |
    umask 077
    source ~/.cargo/env
    TARGET=$(rustc --print=host-tuple)
    env SYD_TEST_DMESG=1 PATH="${PWD}/syd/target/${TARGET}/release:${PATH}" CC="cc -m32" CXX="c++ -m32" LD="ld -m32" ./syd/dev/ltp-test.sh
- test64: |
    umask 077
    source ~/.cargo/env
    TARGET=$(rustc --print=host-tuple)
    env SYD_TEST_DMESG=1 PATH="$HOME/syd/target/${TARGET}/release:$PATH" ./syd/dev/gnulib-test.sh
- test32: |
    umask 077
    source ~/.cargo/env
    TARGET=$(rustc --print=host-tuple)
    env SYD_TEST_DMESG=1 PATH="$HOME/syd/target/${TARGET}/release:$PATH" CC="cc -m32" CXX="c++ -m32" LD="ld -m32" ./syd/dev/gnulib-test.sh
- nix: |
    umask 077
    source ~/.cargo/env
    TARGET=$(rustc --print=host-tuple)
    env SYD_TEST_DMESG=1 PATH="${PWD}/syd/target/${TARGET}/release:${PATH}" ./syd/dev/nix-test.sh || true
