-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
104 lines (101 loc) · 5.17 KB
/
appveyor.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: '{build}'
environment:
MAVEN_VERSION: 3.9.9
image: ubuntu
branches:
only:
- master
configuration: Release
install:
- ls -ahl;
- sh: |
sudo apt -y update > /dev/null;
sudo DEBIAN_FRONTEND=noninteractive apt -qq -y install aria2 gnupg2 graphviz openssl rsync sshpass whois --no-install-suggests --no-install-recommends;
#- whois $(curl ipinfo.io/ip);
# Settings -> Environment -> Environment variables -> Add variable
# CI_OPT_ORIGIN_REPO_SLUG
- sh: |
# make AppVeyor's JDK path (/usr/lib/jvm/java-21-openjdk-amd64) compatible with travis-ci's style (/usr/lib/jvm/java-21-openjdk) to make toolchains.xml valid
if [[ -d /usr/lib/jvm/java-8-openjdk-amd64 ]]; then sudo ln -s /usr/lib/jvm/java-8-openjdk-amd64 /usr/lib/jvm/java-8-openjdk; fi;
if [[ -d /usr/lib/jvm/java-11-openjdk-amd64 ]]; then sudo ln -s /usr/lib/jvm/java-11-openjdk-amd64 /usr/lib/jvm/java-11-openjdk; fi;
if [[ -d /usr/lib/jvm/java-21-openjdk-amd64 ]]; then sudo ln -s /usr/lib/jvm/java-21-openjdk-amd64 /usr/lib/jvm/java-21-openjdk; fi;
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk";
export PATH="$JAVA_HOME:$PATH";
- sh: |
export CI_OPT_MVN_MULTI_STAGE_BUILD="false";
# A host on cloud
#sudo adduser --home /restricted/rsync_user rsync_user;
#
# Add these lines at the end of /etc/ssh/sshd_config
#Match User rsync_user
# PasswordAuthentication yes
#
# Restart sshd
#sudo service sshd restart;
#
# Developer's host
#brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb;
#sshpass -p "${RSYNC_PASSWORD}" ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no [email protected];
#./mvnw -e -ntp -U -Dmaven.repo.local=$(pwd)/.mvn/localRepository clean install sonar:sonar site deploy site-deploy;
#sshpass -p "${RSYNC_PASSWORD}" rsync -r -a -v -e ssh --delete $(pwd)/.mvn/localRepository/ [email protected]:/restricted/rsync_user/m2_repository;
#rm -rf $(pwd)/.mvn/localRepository/*;
#sshpass -p "${RSYNC_PASSWORD}" rsync -r -a -v -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" [email protected]:/restricted/rsync_user/m2_repository/ $(pwd)/.mvn/localRepository;
#- sh: |
# mkdir -p /home/appveyor/.m2/repository;
# sshpass -p "${RSYNC_PASSWORD}" rsync -r -a -v -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" [email protected]:/restricted/rsync_user/m2_repository/ /home/appveyor/.m2/repository > /dev/null;
# du -sh /home/appveyor/.m2/repository;
# ls -ahl /home/appveyor/.m2/repository/;
#- sh: |
# echo "download ${SETTINGS_GLOBAL_XML_URL} to ${SETTINGS_GLOBAL_XML}";
# mkdir -p $(dirname ${SETTINGS_GLOBAL_XML});
# curl -L "${SETTINGS_GLOBAL_XML_URL}" 2>/dev/null | dd of=${SETTINGS_GLOBAL_XML}; cat ${SETTINGS_GLOBAL_XML};
# export MAVEN_GLOBAL_SETTINGS="--global-settings ${SETTINGS_GLOBAL_XML}";
# - sh: |
# if [[ -z "${MAVEN_OPTS}" ]]; then export MAVEN_OPTS="-XX:+UseParallelGC -Dmaven.repo.local=.m2/repository -Dprofile=title -DprofileFormat=JSON,HTML"; fi;
# if [[ -d ${HOME}/.m2 ]]; then rm -rf ${HOME}/.m2/repository/top/infra/maven; ls -ahl ${HOME}/.m2; fi;
# export MAVEN_USER_HOME="${PWD}/.m2";
# ./mvnw ${MAVEN_GLOBAL_SETTINGS} -version;
- sh: |
mvn -v
wget https://downloads.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
tar -xzf apache-maven-3.9.9-bin.tar.gz
sudo mv apache-maven-3.9.9 /opt/maven
export PATH=/opt/maven/bin:$PATH
mvn -v
java -version
# - sh: |
# unset M2_HOME;
# sudo mkdir -p /opt/maven;
# sudo aria2c --file-allocation=none -c -x 10 -s 10 -m 0 --console-log-level=notice --log-level=notice --summary-interval=0 -d /opt/maven -o apache-maven-3.6.1-bin.zip https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.zip && sudo unzip /opt/maven/apache-maven-3.6.1-bin.zip -d /opt/maven > /dev/null;
# sudo ln -sfn apache-maven-3.6.3 /opt/maven/latest;
# export M3_HOME="/opt/maven/latest";
# export PATH="$M3_HOME/bin:$PATH";
# echo "M3_HOME=$M3_HOME, PATH=$PATH";
#- sh: |
# sudo mkdir -p /opt/gradle;
# sudo aria2c --file-allocation=none -c -x 10 -s 10 -m 0 --console-log-level=notice --log-level=notice --summary-interval=0 -d /opt/gradle -o gradle-5.2.1-all.zip https://services.gradle.org/distributions/gradle-5.2.1-all.zip && sudo unzip /opt/gradle/gradle-5.2.1-all.zip -d /opt/gradle > /dev/null;
# sudo ln -sfn gradle-5.2.1 /opt/gradle/latest;
# ls -la /opt/gradle;
# ls -la /opt/gradle/latest/;
# export GRADLE_HOME="/opt/gradle/latest";
# export PATH="$GRADLE_HOME/bin:$PATH";
# echo "GRADLE_HOME=$GRADLE_HOME, PATH=$PATH";
services:
- docker
# see: https://www.appveyor.com/docs/build-environment/
#stack: node 9, jdk 8, jdk 11
stack: jdk 21
build_script:
- mvn clean install -U
test_script:
- mvn clean install -U
after_test:
- ps: |
curl -s https://codecov.io/bash | bash -s - -t 1d910d2b-5749-4c90-bc7d-e8e4b3185606
build: off
cache:
- "$HOME/.cache"
- "$HOME/.gradle"
- "$HOME/.m2/repository"
- "$HOME/.m2/wrapper"
- "$HOME/.sonar/cache"