solvespace/.travis.yml
Maximilian Federle 427a29abb2 Travis: build snaps in LXD containers
With arm64-graviton2 now providing full VM virtualization, LXD containers
can be used to build snaps on all architectures.

This is beneficial for us as having snapcraft manage the whole build
environment is likely to yield better/more consistent results than
running the builds on the Travis images directly.
2020-11-19 19:26:36 +01:00

116 lines
3.0 KiB
YAML

os: linux
dist: xenial
language: c
git:
submodules: false
if: tag != edge
stages:
- test
- name: clean
if: (NOT type IN (pull_request)) AND (branch = master)
- name: deploy
if: (NOT type IN (pull_request)) AND (branch = master OR tag IS present)
jobs:
include:
- stage: clean
name: Remove Github Release
os: linux
dist: bionic
script: .travis/remove-edge.sh
- stage: test
name: macOS
os: osx
osx_image: xcode12.2
install: ".travis/install-macos.sh"
script: ".travis/build-macos.sh"
- stage: deploy
name: macOS
os: osx
osx_image: xcode12.2
install: ".travis/install-macos.sh"
script: ".travis/build-macos.sh release && .travis/sign-macos.sh"
before_deploy: source .travis/tag-edge.sh
deploy:
provider: releases
skip_cleanup: true
prerelease: true
overwrite: true
edge: true
name: ${TRAVIS_TAG:-edge}
release_notes: $TRAVIS_COMMIT_MESSAGE
file: build/bin/SolveSpace.dmg
on:
all_branches: true
- stage: test
name: "Ubuntu"
os: linux
dist: bionic
install: .travis/install-ubuntu.sh
script: .travis/build-ubuntu.sh
- stage: test
name: "Windows"
os: windows
install: .travis/install-windows.sh
script: .travis/build-windows.sh
- stage: deploy
name: "Windows"
os: windows
install: .travis/install-windows.sh
script: .travis/build-windows.sh release
before_deploy: source .travis/tag-edge.sh
deploy:
provider: releases
skip_cleanup: true
prerelease: true
overwrite: true
edge: true
name: ${TRAVIS_TAG:-edge}
release_notes: $TRAVIS_COMMIT_MESSAGE
file: build/bin/RelWithDebInfo/solvespace.exe
on:
all_branches: true
- stage: deploy
name: "Windows with OpenMP"
os: windows
install: .travis/install-windows.sh
script: .travis/build-windows.sh release openmp
before_deploy: source .travis/tag-edge.sh
deploy:
provider: releases
skip_cleanup: true
prerelease: true
overwrite: true
edge: true
name: ${TRAVIS_TAG:-edge}
release_notes: $TRAVIS_COMMIT_MESSAGE
file: build/bin/RelWithDebInfo/solvespace-openmp.exe
on:
all_branches: true
- &deploy-snap
stage: deploy
name: Snap amd64
os: linux
arch: amd64
dist: focal
addons:
snaps:
- name: snapcraft
confinement: classic
- name: lxd
install: .travis/install-snap.sh
script: .travis/build-snap.sh
deploy:
- provider: script
script: .travis/deploy-snap.sh edge
skip_cleanup: true
- provider: script
script: .travis/deploy-snap.sh edge,beta
skip_cleanup: true
on:
tags: true
- <<: *deploy-snap
name: Snap arm64
arch: arm64-graviton2
group: edge
virt: vm