image: obarun/base:latest

before_script:
  - pacman -Syu --noconfirm
  - pacman -S autoconf automake binutils bison file flex gcc gettext git grep groff libtool m4 make patch pkgconf texinfo which --noconfirm
  - ./build_toolchain.sh

test:
  stage: test
  script:
  - ./configure --bindir=/usr/bin --shebangdir=/usr/bin --with-lib=/usr/lib/skalibs --with-lib=/usr/lib/execline --with-lib=/usr/lib/s6 --with-lib=/usr/lib/oblibs
  - make
  - make DESTDIR=gitlab-ci install

  only:
  - merge_requests


build:
  stage: build
  script:
  - ./configure --bindir=/usr/bin --shebangdir=/usr/bin --with-lib=/usr/lib/skalibs --with-lib=/usr/lib/execline --with-lib=/usr/lib/s6 --with-lib=/usr/lib/oblibs
  - make
  - make DESTDIR=gitlab-ci install

  only:
    refs:
      - master

