junest/.travis.yml
2022-12-19 23:12:02 +00:00

60 lines
1.7 KiB
YAML

sudo: required
os: linux
cache:
directories:
- ~/.ccache
- ~/.pkg-cache
services:
- docker
env:
matrix:
- TRAVIS_BASH_VERSION="4.0"
before_install:
- ./ci/install-bash.sh "$TRAVIS_BASH_VERSION"
- sudo apt-get update
- sudo apt-get -y install awscli
install:
- PATH=$PWD/bin:$PATH
script:
#######################
# Unit Tests
#######################
- bash --version
- bash ./tests/checkstyle/checkstyle.sh
- bash ./tests/unit-tests/unit-tests.sh
- shellcheck bin/junest lib/**/*.sh ci/*.sh tests/**/*.sh
# ARM with qemu does seem to work properly. Disabling integ tests for ARM for now.
#- export JUNEST_HOME=~/.junest-arm
#- junest setup --arch arm
#- junest proot --fakeroot -- echo "Installing JuNest (\$(uname -m))"
#- junest proot --fakeroot -- ${PWD}/lib/checks/check.sh --skip-aur-tests
#- junest proot -- ${PWD}/lib/checks/check.sh --skip-aur-tests --use-sudo
#- yes | junest setup --delete
#######################
# Build and validation
#######################
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- docker run --rm -v "$(pwd):/build" -v ~/.ccache:/home/travis/.ccache -v ~/.pkg-cache:/var/cache/pacman/pkg --privileged archlinux:latest bash /build/ci/build_image.sh
- "echo pacman pkg cache size: $(du -h ~/.pkg-cache|cut -f1) in $(ls ~/.pkg-cache|wc -l) files"
- ls -l
# Test the newly created JuNest image against Ubuntu host
- export JUNEST_HOME=~/.junest
- junest setup -i junest-x86_64.tar.gz
- ${PWD}/lib/checks/check_all.sh
- yes | junest setup --delete
after_success:
#######################
# Deploy and validation
#######################
- ./ci/deploy.sh ./junest-x86_64.tar.gz