# BaS_gcc build script for Travis CI
# This will automatically be run on every push to GitHub
# Build History: https://travis-ci.org/firebee-org/BaS_gcc/builds/

language: c
os: linux
dist: trusty
sudo: required

before_install:
  # Install our SSH key pair
  - .travis/install_ssh_id.sh
  - unset SSH_ID
  # Register third-party APT repositories
  - sudo .travis/register_apt_repositories.sh
  # Install additional packages
  - sudo apt-get install -y cross-mint-essential dos2unix lftp
  # Display packages versions
  - git --version
  - make --version
  - ld --version
  - gcc --version
  - m68k-atari-mint-ld --version
  - m68k-atari-mint-gcc --version
  - tar --version
  - unix2dos --version
  - lftp --version

script:
  # Set FIXED_TRAVIS_COMMIT_RANGE
  - . .travis/fix_travis_commit_range.sh
  # Build binaries
  - export VERSION=$(date -u +%Y%m%d-%H%M%S)-$(git rev-parse --short $TRAVIS_COMMIT)
  - make clean
  - make all
  # Add README.txt
  #- .travis/generate-readme.sh >release-archives/README.md
  # Display resulting tree
  #- ls -l release-archives

deploy:
  skip_cleanup: true
  provider: script
  script: .travis/deploy.sh
  on:
    repo: firebee-org/BaS_gcc
    branch: master
