-
Notifications
You must be signed in to change notification settings - Fork 26
117 lines (96 loc) · 3.39 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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Install
on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
branches:
- main
env:
IDRIS2_TESTS_CG: jvm
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
PREVIOUS_VERSION: 0.7.0
jobs:
ubuntu-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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 "$HOME/bin/idris2-$PREVIOUS_VERSION/exec" >> "$GITHUB_PATH"
- name: Build
run: mvn -B install -Dinteractive= -Didris.tests=only=jvm
- name: Copy new version
run: |
mkdir -p "$HOME/bin/idris2-current"
unzip idris-jvm-compiler/target/idris2-*.zip -d "$HOME/bin/idris2-current"
- name: Use new version
run: |
NEW_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "$HOME/bin/idris2-current/idris2-$NEW_VERSION/exec" >> "$GITHUB_PATH"
echo IDRIS2_PREFIX="$HOME/bin/idris2-current/idris2-$NEW_VERSION/env" >> "$GITHUB_ENV"
echo PREFIX="$IDRIS2_PREFIX" >> "$GITHUB_ENV"
- name: Self host
run: mvn -B clean install -Dinteractive= -Didris.tests=only=jvm
windows-build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
env:
MSYSTEM: MINGW64
MSYS2_PATH_TYPE: inherit
IDRIS_EXEC_EXT: .bat
CC: gcc
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: 'maven'
- name: Setup msys2
uses: msys2/setup-msys2@v2
with:
update: true
install: unzip
- 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 "$HOME/bin/idris2-$PREVIOUS_VERSION/exec" >> $GITHUB_PATH
- 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 "$HOME/bin/idris2-current/exec" >> $GITHUB_PATH
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