-
Notifications
You must be signed in to change notification settings - Fork 14
160 lines (127 loc) · 4.53 KB
/
main.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Build and Test ATS3
on:
workflow_dispatch:
pull_request:
push:
permissions:
contents: read
pull-requests: read
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
env:
ATS2_VERSION: 0.4.2
jobs:
build-and-test-cygwin:
runs-on: "windows-latest"
defaults:
run:
shell: C:\tools\cygwin\bin\bash.exe --login -o igncr '{0}'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
uses: egor-tensin/setup-cygwin@v3
with:
platform: x64
packages: make autoconf automake gcc-core libtool intltool pkg-config git libgc-devel libgmp-devel wget
- name: Set environment variables
run: |
echo "PATSHOME=$(cygpath -a $GITHUB_WORKSPACE/ATS2)" >> $GITHUB_ENV
echo "XATSHOME=$(cygpath -a $GITHUB_WORKSPACE)" >> $GITHUB_ENV
- name: Install ATS2
run: ${{ env.XATSHOME }}/.github/install-ats2.sh ${{ env.ATS2_VERSION }} ${{ env.PATSHOME }}
- name: Update PATH
run: |
echo "${{ env.PATSHOME }}/bin" >> $GITHUB_PATH
echo "${{ env.XATSHOME }}/bin" >> $GITHUB_PATH
- name: Build ATS3
run: ${{ env.XATSHOME }}/.github/build.sh
- name: Run Tests
run: ${{ env.XATSHOME }}/.github/test.sh
build-and-test-msys2:
runs-on: "windows-latest"
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
uses: msys2/setup-msys2@v2
with:
update: true
path-type: inherit
install: >-
base-devel
gcc
gmp-devel
libgc-devel
- name: Set environment variables
run: |
echo "MSYS=winsymlinks:lnk" >> $GITHUB_ENV
echo "PATSHOME=$(cygpath -a $GITHUB_WORKSPACE/ATS2)" >> $GITHUB_ENV
echo "XATSHOME=$(cygpath -a $GITHUB_WORKSPACE)" >> $GITHUB_ENV
- name: Install ATS2
run: ${{ env.XATSHOME }}/.github/install-ats2.sh ${{ env.ATS2_VERSION }} ${{ env.PATSHOME }}
- name: Update PATH
run: |
echo "${{ env.PATSHOME }}/bin" >> $GITHUB_PATH
echo "${{ env.XATSHOME }}/bin" >> $GITHUB_PATH
- name: Build ATS3
run: ${{ env.XATSHOME }}/.github/build.sh
- name: Run Tests
run: ${{ env.XATSHOME }}/.github/test.sh
build-and-test-linux:
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: build-essential gcc libgc-dev libgmp-dev
version: 1.0
- name: Set environment variables
run: |
echo "PATSHOME=$GITHUB_WORKSPACE/ATS2" >> $GITHUB_ENV
echo "XATSHOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Install ATS2
run: ${{ env.XATSHOME }}/.github/install-ats2.sh "$ATS2_VERSION" "${{ env.PATSHOME }}"
- name: Update PATH
run: |
echo "${{ env.PATSHOME }}/bin" >> $GITHUB_PATH
echo "${{ env.XATSHOME }}/bin" >> $GITHUB_PATH
- name: Build ATS3
run: ${{ env.XATSHOME }}/.github/build.sh
- name: Run Tests
run: ${{ env.XATSHOME }}/.github/test.sh
build-and-test-macos:
runs-on: "macos-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: brew install gcc gmp bdw-gc
- name: Symbolic link GCC
run: |
ln -s /usr/local/bin/gcc-11 /usr/local/bin/gcc
# Set GCC as a default
- name: Set environment variables
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
echo "CC=/usr/local/bin/gcc-11" >> $GITHUB_ENV
echo "PATSHOME=$GITHUB_WORKSPACE/ATS2" >> $GITHUB_ENV
echo "XATSHOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "C_INCLUDE_PATH=/usr/local/include:$C_INCLUDE_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH" >> $GITHUB_ENV
- name: Install ATS2
run: ${{ env.XATSHOME }}/.github/install-ats2.sh "$ATS2_VERSION" "${{ env.PATSHOME }}"
- name: Update PATH
run: |
echo "${{ env.PATSHOME }}/bin" >> $GITHUB_PATH
echo "${{ env.XATSHOME }}/bin" >> $GITHUB_PATH
- name: Build ATS3
run: ${{ env.XATSHOME }}/.github/build.sh
- name: Run Tests
run: ${{ env.XATSHOME }}/.github/test.sh