-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
90 lines (83 loc) · 2.49 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
language: cpp
sudo: required
cache:
directories:
- /tmp/texlive
- $HOME/.texlive
notifications:
email:
on_success: change
on_failure: change
stages:
- name: test
# temporarily commented out, the LaTeX committee has been fiddling with GPG keys on May 3th 2020,
# which breaks our CI for building LaTeX sources
# - name: report
- name: deploy
if: tag IS present
jobs:
include:
- stage: test
os: linux
dist: xenial
before_script: g++-9 --version
script:
- make all
- make testall
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
env:
- MATRIX_EVAL="CXX=g++-9"
- CC="g++-9"
# - stage: report
# os: linux
# dist: bionic
# before_install:
# # support minted LaTeX package
# - sudo apt-get install python-pygments
# install:
# - source ./.ci/texlive/texlive_install.sh
# - sudo apt-get install texlive-latex-base texlive-latex-recommended texlive-pictures texlive-latex-extra \
# texlive-fonts-recommended texlive-lang-european texlive-lang-italian
# script:
# # build PDF report from LaTeX sources
# - (cd report && texliveonfly --arguments='-shell-escape' main.tex)
- stage: deploy
os: linux
dist: xenial
before_script: g++-9 --version
script:
- make all
install: skip
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
before_deploy:
# prepare release folder
- csvs=(benchmark/*.csv)
- exes=(*.out)
- args=("KruskalNaive" "KruskalUnionFind" "KruskalUnionFindCompressed" "PrimBinaryHeap" "PrimKHeap"
"Shared" "benchmark/analysis.py" "benchmark/tably.py" "datasets" "test" "README.md"
"Makefile" "test.ps1" "testall.ps1" "time.ps1" "benchmark.ps1" "test.sh" "testall.sh"
"time.sh" "HW1.sln" "${csvs[@]}" "${exes[@]}")
- tar -czf ./algorithms-hw1.tar.gz "${args[@]}"
- export DEPLOY_PACKAGE=./algorithms-hw1.tar.gz
- echo "DEPLOY_PACKAGE is ${DEPLOY_PACKAGE}"
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file:
- README.md
- $DEPLOY_PACKAGE
skip_cleanup: true
overwrite: true
on:
# Releases deployment will trigger if and only if the build is tagged
tags: true