-
Notifications
You must be signed in to change notification settings - Fork 26
59 lines (49 loc) · 1.6 KB
/
install.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
name: Install
on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
branches:
- main
env:
IDRIS2_TESTS_CG: jvm
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
PREVIOUS_VERSION: 0.6.0.4
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: 'maven'
- name: Set IDRIS2_PREFIX
run: echo IDRIS2_PREFIX="$HOME/bin/idris2-$PREVIOUS_VERSION/env" >> "$GITHUB_ENV"
- name: Set PREFIX
run: echo PREFIX="$IDRIS2_PREFIX" >> "$GITHUB_ENV"
- name: Download previous version
run: |
mvn dependency:copy "-Dartifact=io.github.mmhelloworld:idris-jvm-compiler:$PREVIOUS_VERSION:zip" -DoutputDirectory=. -U
unzip idris-jvm-compiler-*.zip -d "$HOME/bin"
echo "::add-path::$HOME/bin/idris2-$PREVIOUS_VERSION/exec"
- name: Build
run: mvn -B install -Dinteractive= -Didris.tests=only=jvm
- name: Copy new version
run: |
mkdir -p "$HOME/bin/idris2-current"
cp -r build/exec "$HOME/bin/idris2-current/exec"
cp -r build/env "$HOME/bin/idris2-current/env"
- name: Use new version
run: |
echo "::add-path::$HOME/bin/idris2-current/exec"
echo IDRIS2_PREFIX="$HOME/bin/idris2-current/env" >> "$GITHUB_ENV"
echo PREFIX="$IDRIS2_PREFIX" >> "$GITHUB_ENV"
- name: Self host
run: mvn -B clean install -Dinteractive= -Didris.tests=only=jvm