-
Notifications
You must be signed in to change notification settings - Fork 16
97 lines (94 loc) · 3.71 KB
/
build.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
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Decrypting keys
if: github.ref == 'refs/heads/master'
run: |
echo "Creating ssh"
mkdir ~/.ssh
chmod 755 ~/.ssh
echo "Decrypting wollok-cli"
openssl aes-128-ctr -d -K ${{ secrets.WOLLOK_CLI_KEY }} -iv ${{ secrets.WOLLOK_CLI_IV }} -in ./scripts/wollokcli_key.enc -out ~/.ssh/wollokcli_key
echo "Decrypting wollok-site"
openssl aes-128-ctr -d -K ${{ secrets.WOLLOK_SITE_KEY }} -iv ${{ secrets.WOLLOK_SITE_IV }} -in ./scripts/wolloksite_key.enc -out ~/.ssh/wolloksite_key
chmod 600 ~/.ssh/wollokcli_key ~/.ssh/wolloksite_key
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_JOB: $GITHUB_JOB
- name: Run Maven Build
run: |
openssl aes-256-cbc -pass pass:${{ secrets.SETTINGS_GPG_TOKEN }} -pbkdf2 -in ./settings.xml.enc -out ./settings.xml -d
mv ./settings.xml ~/.m2/settings.xml
export DISPLAY=:99.0
sudo apt-get install -y xvfb
./wollokInstall.sh
cd org.uqbar.project.wollok.releng/
export PROFILES=normalProfile
export UPDATE_SITE=none
echo "Running with profiles $PROFILES"
echo "Running with UPDATE_SITE $UPDATE_SITE"
export MAVEN_OPTS=-Xmx2048m
mvn -q -N io.takari:maven:0.7.7:wrapper -Dmaven=3.6.3 && xvfb-run ./mvnw -V -e -Darguments='-Dtycho.disableP2Mirrors=false' \
-D tycho.disableP2Mirrors=false -U \
-D repoToken=${{ secrets.GITHUB_TOKEN }} \
clean install jacoco:report \
coveralls:report \
--no-transfer-progress \
-P $PROFILES
cd ..
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_NAME: github
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
CI_BUILD_NUMBER: ${{ github.run_id }}
CI_BUILD_URL: https://github.com/${{ github.repository }}/commit/${{ github.event.after }}/checks
CI_PULL_REQUEST: ${{ steps.refs.outputs.pr_number }}
- name: Updating wollok-cli & wollok-site
if: github.ref == 'refs/heads/master'
run: |
cd ./scripts
cp ./ssh_config ~/.ssh/config
chmod 777 ./updateRestOfWollokRepos.sh
"./updateRestOfWollokRepos.sh"
cd ..
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_RUN_ID: $GITHUB_RUN_ID
- name: Releasing Latest Development Version
if: github.ref == 'refs/heads/dev'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
**/wollok-linux*64.zip
**/wollok-macosx*64.zip
**/wollok-win32*64.zip
- name: Product Release
uses: "marvinpinto/action-automatic-releases@latest"
if: startsWith(github.ref, 'refs/tags/')
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
**/wollok-linux*64.zip
**/wollok-macosx*64.zip
**/wollok-win32*64.zip