-
Notifications
You must be signed in to change notification settings - Fork 463
218 lines (203 loc) · 8.66 KB
/
build-and-test.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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
name: GitHub CI
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
linux-and-mac:
# if: ${{ false }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} BUILD=${{ matrix.config.build }} CC=${{ matrix.config.cc }} CXX=${{ matrix.config.cxx }} AUTOTOOLS=${{ matrix.config.autotools }}
strategy:
fail-fast: false
matrix:
config:
#- {os: ubuntu-16.04, build: 'static', cc: 'gcc-4.4', cxx: 'g++-4.4', autotools: 'no', cppstd: 'gnu++0x'}
#- {os: ubuntu-16.04, build: 'static', cc: 'gcc-4.6', cxx: 'g++-4.6', autotools: 'no', cppstd: 'gnu++0x'}
- {os: ubuntu-16.04, build: 'static', cc: 'gcc-4.7', cxx: 'g++-4.7', autotools: 'no', cppstd: 'gnu++11'}
- {os: ubuntu-16.04, build: 'static', cc: 'gcc-4.8', cxx: 'g++-4.8', autotools: 'no', cppstd: 'c++11'}
- {os: ubuntu-16.04, build: 'static', cc: 'gcc-5', cxx: 'g++-5', autotools: 'no', cppstd: 'c++11'}
- {os: ubuntu-16.04, build: 'static', cc: 'gcc-6', cxx: 'g++-6', autotools: 'no', cppstd: 'c++11'}
- {os: ubuntu-latest, build: 'static', cc: 'gcc-7', cxx: 'g++-7', autotools: 'no', cppstd: 'c++11'}
- {os: ubuntu-latest, build: 'shared', cc: 'gcc', cxx: 'g++', autotools: 'yes', cppstd: 'c++11'}
- {os: ubuntu-latest, build: 'static', cc: 'gcc', cxx: 'g++', autotools: 'yes', cppstd: 'c++11'}
- {os: ubuntu-latest, build: 'shared', cc: 'gcc', cxx: 'g++', autotools: 'no', cppstd: 'c++11'}
- {os: ubuntu-latest, build: 'static', cc: 'gcc', cxx: 'g++', autotools: 'no', cppstd: 'c++11'}
- {os: ubuntu-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11'}
- {os: ubuntu-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11'}
- {os: ubuntu-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11'}
- {os: ubuntu-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11'}
- {os: macOS-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11'}
- {os: macOS-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11'}
- {os: macOS-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11'}
- {os: macOS-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11'}
env:
ASAN_OPTIONS: detect_odr_violation=0
AUTOTOOLS: ${{ matrix.config.autotools }}
COVERAGE: no
BUILD: ${{ matrix.config.build }}
CXX: ${{ matrix.config.cxx }}
CC: ${{ matrix.config.cc }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
if: matrix.config.os == 'ubuntu-16.04'
with:
ruby-version: 2.6
- name: Install ruby hrx module
if: matrix.config.os == 'ubuntu-16.04'
run: sudo /opt/hostedtoolcache/Ruby/2.6.7/x64/bin/gem install hrx
- name: Install ruby minitest module
if: matrix.config.os == 'ubuntu-16.04'
run: sudo /opt/hostedtoolcache/Ruby/2.6.7/x64/bin/gem install minitest
- name: Install automake if needed (MacOS)
if: runner.os == 'macOS'
run: brew install automake
- name: Install gcc 7 if needed
if: matrix.config.cc == 'gcc-7'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y
- name: Install gcc 6 if needed
if: matrix.config.cc == 'gcc-6'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-6 -y
- name: Install gcc 5 if needed
if: matrix.config.cc == 'gcc-5'
run: |
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo apt update
sudo apt install g++-5 -y
- name: Install gcc 4.8 if needed
if: matrix.config.cc == 'gcc-4.8'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-4.8 -y
- name: Install gcc 4.7 if needed
if: matrix.config.cc == 'gcc-4.7'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-4.7 -y
- name: Install gcc 4.6 if needed
if: matrix.config.cc == 'gcc-4.6'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-4.6 -y
- name: Install gcc 4.5 if needed
if: matrix.config.cc == 'gcc-4.5'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-4.5 -y
- name: Install gcc 4.4 if needed
if: matrix.config.cc == 'gcc-4.4'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-4.4 -y
- name: ./script/ci-install-deps
env:
MAKE_OPTS: LIBSASS_CPPSTD=${{ matrix.config.cppstd }}
run: ./script/ci-install-deps
- name: ./script/ci-install-compiler
env:
MAKE_OPTS: LIBSASS_CPPSTD=${{ matrix.config.cppstd }}
run: ./script/ci-install-compiler
- name: ./script/ci-build-libsass
env:
MAKE_OPTS: LIBSASS_CPPSTD=${{ matrix.config.cppstd }}
run: ./script/ci-build-libsass
windows-msvc:
runs-on: windows-latest
name: Windows MSVC build
strategy:
fail-fast: false
matrix:
config:
- {build: Release, platform: Win64}
- {build: Debug, platform: Win64}
- {build: Release, platform: Win32}
- {build: Debug, platform: Win32}
steps:
- name: Change git config to preserve line-endings
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- name: Install ruby hrx module
run: gem install hrx
- name: Install ruby minitest module
run: gem install minitest
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Clone and checkout sassc repository
run: git clone https://github.com/sass/sassc.git
- name: Clone and checkout sass-spec repository
run: git clone https://github.com/sass/sass-spec.git
- name: Compile libsass ${{ matrix.config.build }} build for ${{ matrix.config.platform }}
run: msbuild /m:4 /p:"Configuration=${{ matrix.config.build }};Platform=${{ matrix.config.platform }}" sassc\win\sassc.sln
- name: Execute spec test runner
run: ruby sass-spec/sass-spec.rb --probe-todo --impl libsass -c sassc/bin/sassc.exe -s sass-spec/spec
windows-mingw:
runs-on: windows-latest
name: Windows MinGW build
strategy:
fail-fast: false
matrix:
config:
- {build: shared, platform: x64}
- {build: static, platform: x64}
- {build: shared, platform: x86}
- {build: static, platform: x86}
steps:
- name: Change git config to preserve line-endings
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- name: Set up MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: ${{ matrix.config.platform }}
- name: Install ruby hrx module
run: gem install hrx
- name: Install ruby minitest module
run: gem install minitest
- name: Clone and checkout sassc repository
run: git clone https://github.com/sass/sassc.git
- name: Clone and checkout sass-spec repository
run: git clone https://github.com/sass/sass-spec.git
- name: Add libsass library path to be found
if: matrix.config.build == 'shared'
run: echo "/d/a/libsass/libsass/lib" >> $GITHUB_PATH
- name: Compile libsass ${{ matrix.config.build }} build for ${{ matrix.config.platform }}
run: make ${{ matrix.config.build }} BUILD=${{ matrix.config.build }}
- name: Copy library over to pass call test
if: matrix.config.build == 'shared'
run: copy /a/libsass/libsass/lib/libsass.dll sassc/bin/
- name: Compile sassc ${{ matrix.config.build }} build for ${{ matrix.config.platform }}
run: make sassc BUILD=${{ matrix.config.build }}
- name: Execute spec test runner
run: ruby sass-spec/sass-spec.rb --probe-todo --impl libsass -c sassc/bin/sassc.exe -s sass-spec/spec
#- name: Install LLVM and Clang
# uses: KyleMayes/install-llvm-action@v1.2.2