-
-
Notifications
You must be signed in to change notification settings - Fork 82
183 lines (179 loc) · 5.47 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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: Build
on:
push:
pull_request:
#schedule:
# - cron: '0 */2 * * *'
jobs:
build-linux:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
GAUCHE_TEST_PATH: ../Gauche-tmp-self-host-test/stage2
TESTLOG_NAME: testlog-linux
TESTLOG_PATH: testlog-linux
steps:
- uses: actions/checkout@v3
- uses: shirok/setup-gauche@v2
- name: Run release version of Gauche
run: |
gosh -V
- name: Install tools
run: |
sudo apt-get install libgdbm-dev
- name: Self-host-test
run: |
gcc -v
./DIST self-host-test
- name: Copy testlog
if: always()
run: |
cd $GAUCHE_TEST_PATH
mkdir -p $GITHUB_WORKSPACE/$TESTLOG_PATH/$TESTLOG_NAME
cp src/test.log $GITHUB_WORKSPACE/$TESTLOG_PATH/$TESTLOG_NAME
for d in ext/*; do
if test -f $d/test.log; then
mkdir -p $GITHUB_WORKSPACE/$TESTLOG_PATH/$TESTLOG_NAME/$d
cp $d/test.log $GITHUB_WORKSPACE/$TESTLOG_PATH/$TESTLOG_NAME/$d
fi
done
- name: Upload testlog
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ env.TESTLOG_NAME }}
path: ${{ env.TESTLOG_PATH }}
build-osx:
strategy:
fail-fast: false
matrix:
os: [macos-latest, macos-11]
runs-on: ${{ matrix.os }}
timeout-minutes: 90
env:
GAUCHE_TEST_PATH: ../Gauche-tmp-self-host-test/stage2
TESTLOG_NAME: testlog-osx-${{ matrix.os }}
TESTLOG_PATH: testlog-osx-${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: shirok/setup-gauche@v2
- name: Run release version of Gauche
run: |
gosh -V
- name: Install tools
run: |
brew install automake
- name: Self-host-test
run: |
gcc -v
./DIST self-host-test
- name: Copy testlog
if: always()
run: |
cd $GAUCHE_TEST_PATH
mkdir -p $GITHUB_WORKSPACE/$TESTLOG_PATH/$TESTLOG_NAME
cp src/test.log $GITHUB_WORKSPACE/$TESTLOG_PATH/$TESTLOG_NAME
for d in ext/*; do
if test -f $d/test.log; then
mkdir -p $GITHUB_WORKSPACE/$TESTLOG_PATH/$TESTLOG_NAME/$d
cp $d/test.log $GITHUB_WORKSPACE/$TESTLOG_PATH/$TESTLOG_NAME/$d
fi
done
- name: Upload testlog
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ env.TESTLOG_NAME }}
path: ${{ env.TESTLOG_PATH }}
build-windows:
runs-on: windows-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
arch: [x86_64, i686]
include:
- arch: x86_64
bit: 64
devtool_path: D:\devtool64
- arch: i686
bit: 32
devtool_path: D:\devtool32
env:
GAUCHE_VERSION_URL: https://practical-scheme.net/gauche/releases/latest.txt
GAUCHE_INSTALLER_URL: https://practical-scheme.net/gauche/releases/latest.${{ matrix.bit }}bit.msi
GAUCHE_PATH: ${{ matrix.devtool_path }}\Gauche\bin
TESTLOG_NAME: testlog-windows-${{ matrix.arch }}
TESTLOG_PATH: testlog-windows-${{ matrix.arch }}
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW${{ matrix.bit }}
path-type: inherit
release: true
update: true
install: 'base-devel mingw-w64-${{ matrix.arch }}-toolchain mingw-w64-${{ matrix.arch }}-autotools'
- name: Run MSYS2 once
shell: msys2 {0}
run: |
pwd
echo $MSYSTEM
echo $MSYS2_PATH_TYPE
echo $PATH
- name: Install Gauche
shell: msys2 {0}
run: |
GAUCHE_INSTALLER_VERSION=`curl -f $GAUCHE_VERSION_URL`
echo $GAUCHE_INSTALLER_VERSION
GAUCHE_INSTALLER=Gauche-mingw-$GAUCHE_INSTALLER_VERSION-${{ matrix.bit }}bit.msi
echo $GAUCHE_INSTALLER
curl -f -L -o $GAUCHE_INSTALLER $GAUCHE_INSTALLER_URL
ls -l
cmd.exe //c "start /wait msiexec /a $GAUCHE_INSTALLER /quiet /qn /norestart TARGETDIR=${{ matrix.devtool_path }}"
- name: Add Gauche path
run: |
echo "PATH=$env:GAUCHE_PATH;$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Run Gauche once
shell: msys2 {0}
run: |
where gosh
gosh -V
- name: Install tools
shell: msys2 {0}
run: |
where openssl
echo 'Rename unavailable openssl.exe'
mv /mingw${{ matrix.bit }}/bin/openssl.exe /mingw${{ matrix.bit }}/bin/openssl_NG.exe
where openssl
/usr/bin/openssl version
- name: Build
shell: msys2 {0}
run: |
gcc -v
./DIST gen
src/mingw-dist.sh --without-axtls
- name: Test
shell: msys2 {0}
run: |
make -s check
- name: Copy testlog
if: always()
shell: msys2 {0}
run: |
mkdir -p $TESTLOG_PATH/$TESTLOG_NAME
cp src/test.log $TESTLOG_PATH/$TESTLOG_NAME
for d in ext/*; do if test -f $d/test.log; then mkdir -p $TESTLOG_PATH/$TESTLOG_NAME/$d; cp $d/test.log $TESTLOG_PATH/$TESTLOG_NAME/$d; fi; done
- name: Upload testlog
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ env.TESTLOG_NAME }}
path: ${{ env.TESTLOG_PATH }}
#- name: Upload result
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: Gauche-${{ matrix.arch }}
# path: ../Gauche-mingw-dist/Gauche-${{ matrix.arch }}