Skip to content

Commit 8ef17eb

Browse files
committed
Bing bang commit for LibSass 4.0
1 parent f6afdbb commit 8ef17eb

File tree

382 files changed

+70329
-33774
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

382 files changed

+70329
-33774
lines changed

.github/workflows/build-and-test.yml

Lines changed: 61 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,41 @@ on:
1313
jobs:
1414

1515
linux-and-mac:
16+
name: Linux and MacOS build
1617
# if: ${{ false }}
1718
runs-on: ${{ matrix.config.os }}
18-
name: ${{ matrix.config.os }} BUILD=${{ matrix.config.build }} CC=${{ matrix.config.cc }} CXX=${{ matrix.config.cxx }} AUTOTOOLS=${{ matrix.config.autotools }}
1919

2020
strategy:
21-
fail-fast: false
21+
# fail-fast: false
2222
matrix:
2323
config:
2424
#- {os: ubuntu-16.04, build: 'static', cc: 'gcc-4.4', cxx: 'g++-4.4', autotools: 'no', cppstd: 'gnu++0x'}
2525
#- {os: ubuntu-16.04, build: 'static', cc: 'gcc-4.6', cxx: 'g++-4.6', autotools: 'no', cppstd: 'gnu++0x'}
26-
- {os: ubuntu-16.04, build: 'static', cc: 'gcc-4.7', cxx: 'g++-4.7', autotools: 'no', cppstd: 'gnu++11'}
27-
- {os: ubuntu-16.04, build: 'static', cc: 'gcc-4.8', cxx: 'g++-4.8', autotools: 'no', cppstd: 'c++11'}
26+
#- {os: ubuntu-16.04, build: 'static', cc: 'gcc-4.7', cxx: 'g++-4.7', autotools: 'no', cppstd: 'gnu++11'}
27+
#- {os: ubuntu-16.04, build: 'static', cc: 'gcc-4.8', cxx: 'g++-4.8', autotools: 'no', cppstd: 'c++11'}
2828
- {os: ubuntu-16.04, build: 'static', cc: 'gcc-5', cxx: 'g++-5', autotools: 'no', cppstd: 'c++11'}
2929
- {os: ubuntu-16.04, build: 'static', cc: 'gcc-6', cxx: 'g++-6', autotools: 'no', cppstd: 'c++11'}
3030
- {os: ubuntu-latest, build: 'static', cc: 'gcc-7', cxx: 'g++-7', autotools: 'no', cppstd: 'c++11'}
31-
- {os: ubuntu-latest, build: 'shared', cc: 'gcc', cxx: 'g++', autotools: 'yes', cppstd: 'c++11'}
32-
- {os: ubuntu-latest, build: 'static', cc: 'gcc', cxx: 'g++', autotools: 'yes', cppstd: 'c++11'}
31+
- {os: ubuntu-latest, build: 'shared', cc: 'gcc', cxx: 'g++', autotools: 'yes', cppstd: 'c++11', cflags: '-g -fsanitize=address'}
32+
- {os: ubuntu-latest, build: 'static', cc: 'gcc', cxx: 'g++', autotools: 'yes', cppstd: 'c++11', cflags: '-g -fsanitize=address'}
3333
- {os: ubuntu-latest, build: 'shared', cc: 'gcc', cxx: 'g++', autotools: 'no', cppstd: 'c++11'}
3434
- {os: ubuntu-latest, build: 'static', cc: 'gcc', cxx: 'g++', autotools: 'no', cppstd: 'c++11'}
35-
- {os: ubuntu-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11'}
36-
- {os: ubuntu-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11'}
37-
- {os: ubuntu-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11'}
38-
- {os: ubuntu-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11'}
39-
- {os: macOS-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11'}
40-
- {os: macOS-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11'}
41-
- {os: macOS-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11'}
42-
- {os: macOS-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11'}
35+
- {os: ubuntu-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11', cflags: '-g -fsanitize=address'}
36+
- {os: ubuntu-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11', cflags: '-g -fsanitize=address'}
37+
- {os: ubuntu-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11', cflags: '-g -fsanitize=address'}
38+
- {os: ubuntu-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11', cflags: '-g -fsanitize=address'}
39+
- {os: macOS-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11', cflags: '-g -fsanitize=address'}
40+
- {os: macOS-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'yes', cppstd: 'c++11', cflags: '-g -fsanitize=address'}
41+
- {os: macOS-latest, build: 'shared', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11', cflags: '-g -fsanitize=address'}
42+
- {os: macOS-latest, build: 'static', cc: 'clang', cxx: 'clang++', autotools: 'no', cppstd: 'c++11', cflags: '-g -fsanitize=address'}
4343

4444
env:
45-
ASAN_OPTIONS: detect_odr_violation=0
45+
ASAN_OPTIONS: ${{ matrix.config.asan }}
4646
AUTOTOOLS: ${{ matrix.config.autotools }}
47+
EXTRA_CFLAGS: ${{ matrix.config.cflags }}
48+
EXTRA_CXXFLAGS: ${{ matrix.config.cflags }}
49+
EXTRA_LDFLAGS: ${{ matrix.config.cflags }}
50+
SASS_LIBSASS_PATH: libsass
4751
COVERAGE: no
4852
BUILD: ${{ matrix.config.build }}
4953
CXX: ${{ matrix.config.cxx }}
@@ -125,20 +129,31 @@ jobs:
125129
env:
126130
MAKE_OPTS: LIBSASS_CPPSTD=${{ matrix.config.cppstd }}
127131
run: ./script/ci-build-libsass
132+
- name: Call LibSass make install
133+
run: sudo EXTRA_CFLAGS="$EXTRA_CFLAGS" EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS" EXTRA_LDFLAGS="$EXTRA_LDFLAGS" make install
134+
- name: Call SassC make install
135+
run: sudo EXTRA_CFLAGS="$EXTRA_CFLAGS" EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS" EXTRA_LDFLAGS="$EXTRA_LDFLAGS" make -C sassc install
136+
- name: Check sassc help call
137+
run: sassc --term-colors --help
128138

129139

130140
windows-msvc:
131-
runs-on: windows-latest
141+
runs-on: ${{ matrix.config.os }}
132142
name: Windows MSVC build
143+
# if: ${{ false }}
133144

134145
strategy:
135-
fail-fast: false
146+
# fail-fast: false
136147
matrix:
137148
config:
138-
- {build: Release, platform: Win64}
139-
- {build: Debug, platform: Win64}
140-
- {build: Release, platform: Win32}
141-
- {build: Debug, platform: Win32}
149+
- {os: 'windows-latest', build: Release, platform: Win64, version: 'latest'}
150+
- {os: 'windows-latest', build: Debug, platform: Win64, version: 'latest'}
151+
- {os: 'windows-latest', build: Release, platform: Win32, version: 'latest'}
152+
- {os: 'windows-latest', build: Debug, platform: Win32, version: 'latest'}
153+
- {os: 'windows-2016', build: Release, platform: Win64, version: '[15.0,16.0]'}
154+
- {os: 'windows-2016', build: Debug, platform: Win64, version: '[15.0,16.0]'}
155+
- {os: 'windows-2016', build: Release, platform: Win32, version: '[15.0,16.0]'}
156+
- {os: 'windows-2016', build: Debug, platform: Win32, version: '[15.0,16.0]'}
142157

143158
steps:
144159
- name: Change git config to preserve line-endings
@@ -156,28 +171,40 @@ jobs:
156171
run: gem install minitest
157172
- name: Add msbuild to PATH
158173
uses: microsoft/[email protected]
174+
with:
175+
vs-version: ${{ matrix.config.version }}
159176
- name: Clone and checkout sassc repository
160-
run: git clone https://github.com/sass/sassc.git
177+
run: git clone https://github.com/mgreter/sassc.git --branch refactor/libsass-4-alpha
161178
- name: Clone and checkout sass-spec repository
162-
run: git clone https://github.com/sass/sass-spec.git
179+
run: git clone https://github.com/mgreter/sass-spec.git --branch refactor/libsass-4-alpha
163180
- name: Compile libsass ${{ matrix.config.build }} build for ${{ matrix.config.platform }}
164-
run: msbuild /m:4 /p:"Configuration=${{ matrix.config.build }};Platform=${{ matrix.config.platform }}" sassc\win\sassc.sln
181+
run: msbuild /m:4 /p:Configuration=${{ matrix.config.build }} /p:Platform=${{ matrix.config.platform }} sassc\win\sassc.sln
182+
- name: Check sassc help call
183+
run: sassc\bin\sassc.exe --term-colors --help
165184
- name: Execute spec test runner
185+
if: matrix.config.build != 'Debug'
166186
run: ruby sass-spec/sass-spec.rb --probe-todo --impl libsass -c sassc/bin/sassc.exe -s sass-spec/spec
167187

168188
windows-mingw:
169189
runs-on: windows-latest
170190
name: Windows MinGW build
171191

172192
strategy:
173-
fail-fast: false
193+
# fail-fast: false
174194
matrix:
175195
config:
176196
- {build: shared, platform: x64}
177197
- {build: static, platform: x64}
178198
- {build: shared, platform: x86}
179199
- {build: static, platform: x86}
180200

201+
env:
202+
ASAN_OPTIONS: ${{ matrix.config.asan }}
203+
EXTRA_CFLAGS: ${{ matrix.config.cflags }}
204+
EXTRA_CXXFLAGS: ${{ matrix.config.cflags }}
205+
#SASS_LIBSASS_PATH: libsass
206+
#COVERAGE: no
207+
181208
steps:
182209
- name: Change git config to preserve line-endings
183210
run: |
@@ -197,19 +224,20 @@ jobs:
197224
- name: Install ruby minitest module
198225
run: gem install minitest
199226
- name: Clone and checkout sassc repository
200-
run: git clone https://github.com/sass/sassc.git
227+
run: git clone https://github.com/mgreter/sassc.git --branch refactor/libsass-4-alpha
201228
- name: Clone and checkout sass-spec repository
202-
run: git clone https://github.com/sass/sass-spec.git
203-
- name: Add libsass library path to be found
204-
if: matrix.config.build == 'shared'
205-
run: echo "/d/a/libsass/libsass/lib" >> $GITHUB_PATH
229+
run: git clone https://github.com/mgreter/sass-spec.git --branch refactor/libsass-4-alpha
206230
- name: Compile libsass ${{ matrix.config.build }} build for ${{ matrix.config.platform }}
207-
run: make ${{ matrix.config.build }} BUILD=${{ matrix.config.build }}
231+
run: make -j5 ${{ matrix.config.build }} BUILD=${{ matrix.config.build }} CC=gcc
232+
- name: Listening results
233+
run: dir lib
208234
- name: Copy library over to pass call test
209235
if: matrix.config.build == 'shared'
210-
run: copy /a/libsass/libsass/lib/libsass.dll sassc/bin/
236+
run: copy lib\libsass.dll sassc\bin
211237
- name: Compile sassc ${{ matrix.config.build }} build for ${{ matrix.config.platform }}
212-
run: make sassc BUILD=${{ matrix.config.build }}
238+
run: make -j5 sassc BUILD=${{ matrix.config.build }} CC=gcc
239+
- name: Check sassc help call
240+
run: sassc\bin\sassc.exe --term-colors --help
213241
- name: Execute spec test runner
214242
run: ruby sass-spec/sass-spec.rb --probe-todo --impl libsass -c sassc/bin/sassc.exe -s sass-spec/spec
215243

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ libsass/*
5353
*.lo
5454
*.so
5555
*.dll
56+
*.h.gch
57+
*.h.pch
58+
*.hpp.gch
59+
*.hpp.pch
5660
*.a
5761
*.suo
5862
*.sdf

GNUmakefile.am

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if ENABLE_TESTS
2929

3030
SASS_SASSC_PATH ?= $(top_srcdir)/sassc
3131
SASS_SPEC_PATH ?= $(top_srcdir)/sass-spec
32-
LIBSASS_SPEC_PATH ?= $(top_srcdir)/libsass-spec
32+
SASS_SPEC_ROOT ?= $(top_srcdir)/sass-spec
3333

3434
noinst_PROGRAMS = tester
3535
tester_LDADD = src/libsass.la
@@ -50,41 +50,25 @@ AM_RB_LOG_FLAGS = $(RUBY)
5050
SASS_TEST_FLAGS = --impl libsass
5151
SASS_TEST_FLAGS += -r $(SASS_SPEC_PATH)/spec
5252
SASS_TEST_FLAGS += -c $(top_srcdir)/tester$(EXEEXT)
53-
LIBSASS_TEST_FLAGS = --impl libsass
54-
LIBSASS_TEST_FLAGS += -r $(LIBSASS_SPEC_PATH)/spec
55-
LIBSASS_TEST_FLAGS += -c $(top_srcdir)/tester$(EXEEXT)
56-
COMPRESSED_TEST_FLAGS = --impl libsass
57-
COMPRESSED_TEST_FLAGS += -r $(LIBSASS_SPEC_PATH)/styles/compressed
58-
COMPRESSED_TEST_FLAGS += -c $(top_srcdir)/tester$(EXEEXT)
59-
COMPRESSED_TEST_FLAGS += --cmd-args="-t compressed"
53+
SASS_TEST_FLAGS += --cmd-args "-I $(SASS_SPEC_ROOT)/spec"
6054
AM_TESTS_ENVIRONMENT = TEST_FLAGS='$(SASS_TEST_FLAGS)'
6155

6256
SASS_TESTER = $(RUBY) $(SASS_SPEC_PATH)/sass-spec.rb
6357

6458
test:
6559
$(SASS_TESTER) $(SASS_TEST_FLAGS)
66-
$(SASS_TESTER) $(LIBSASS_TEST_FLAGS)
67-
$(SASS_TESTER) $(COMPRESSED_TEST_FLAGS)
6860

6961
test_build:
7062
$(SASS_TESTER) $(SASS_TEST_FLAGS)
71-
$(SASS_TESTER) $(LIBSASS_TEST_FLAGS)
72-
$(SASS_TESTER) $(COMPRESSED_TEST_FLAGS)
7363

7464
test_full:
7565
$(SASS_TESTER) --run-todo $(SASS_TEST_FLAGS)
76-
$(SASS_TESTER) --run-todo $(LIBSASS_TEST_FLAGS)
77-
$(SASS_TESTER) --run-todo $(COMPRESSED_TEST_FLAGS)
7866

7967
test_probe:
8068
$(SASS_TESTER) --probe-todo $(SASS_TEST_FLAGS)
81-
$(SASS_TESTER) --probe-todo $(LIBSASS_TEST_FLAGS)
82-
$(SASS_TESTER) --probe-todo $(COMPRESSED_TEST_FLAGS)
8369

8470
test_interactive:
8571
$(SASS_TESTER) --interactive $(SASS_TEST_FLAGS)
86-
$(SASS_TESTER) --interactive $(LIBSASS_TEST_FLAGS)
87-
$(SASS_TESTER) --interactive $(COMPRESSED_TEST_FLAGS)
8872

8973
.PHONY: test test_build test_full test_probe
9074

0 commit comments

Comments
 (0)