|
| 1 | +name: GitHub CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - develop |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - master |
| 11 | + - develop |
| 12 | + |
| 13 | +jobs: |
| 14 | + |
| 15 | + linux-and-mac: |
| 16 | + # if: ${{ false }} |
| 17 | + 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 }} |
| 19 | + |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + config: |
| 24 | + #- {os: ubuntu-16.04, build: 'static', cc: 'gcc-4.4', cxx: 'g++-4.4', autotools: 'no', cppstd: 'gnu++0x'} |
| 25 | + #- {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'} |
| 28 | + - {os: ubuntu-16.04, build: 'static', cc: 'gcc-5', cxx: 'g++-5', autotools: 'no', cppstd: 'c++11'} |
| 29 | + - {os: ubuntu-16.04, build: 'static', cc: 'gcc-6', cxx: 'g++-6', autotools: 'no', cppstd: 'c++11'} |
| 30 | + - {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'} |
| 33 | + - {os: ubuntu-latest, build: 'shared', cc: 'gcc', cxx: 'g++', autotools: 'no', cppstd: 'c++11'} |
| 34 | + - {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'} |
| 43 | + |
| 44 | + env: |
| 45 | + ASAN_OPTIONS: detect_odr_violation=0 |
| 46 | + AUTOTOOLS: ${{ matrix.config.autotools }} |
| 47 | + COVERAGE: no |
| 48 | + BUILD: ${{ matrix.config.build }} |
| 49 | + CXX: ${{ matrix.config.cxx }} |
| 50 | + CC: ${{ matrix.config.cc }} |
| 51 | + |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v2 |
| 54 | + - uses: ruby/setup-ruby@v1 |
| 55 | + if: matrix.config.os == 'ubuntu-16.04' |
| 56 | + with: |
| 57 | + ruby-version: 2.6 |
| 58 | + - name: Install ruby hrx module |
| 59 | + if: matrix.config.os == 'ubuntu-16.04' |
| 60 | + run: sudo /opt/hostedtoolcache/Ruby/2.6.7/x64/bin/gem install hrx |
| 61 | + - name: Install ruby minitest module |
| 62 | + if: matrix.config.os == 'ubuntu-16.04' |
| 63 | + run: sudo /opt/hostedtoolcache/Ruby/2.6.7/x64/bin/gem install minitest |
| 64 | + - name: Install automake if needed (MacOS) |
| 65 | + if: runner.os == 'macOS' |
| 66 | + run: brew install automake |
| 67 | + - name: Install gcc 7 if needed |
| 68 | + if: matrix.config.cc == 'gcc-7' |
| 69 | + run: | |
| 70 | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
| 71 | + sudo apt update |
| 72 | + sudo apt install g++-7 -y |
| 73 | + - name: Install gcc 6 if needed |
| 74 | + if: matrix.config.cc == 'gcc-6' |
| 75 | + run: | |
| 76 | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
| 77 | + sudo apt update |
| 78 | + sudo apt install g++-6 -y |
| 79 | + - name: Install gcc 5 if needed |
| 80 | + if: matrix.config.cc == 'gcc-5' |
| 81 | + run: | |
| 82 | + sudo add-apt-repository universe |
| 83 | + sudo add-apt-repository multiverse |
| 84 | + sudo apt update |
| 85 | + sudo apt install g++-5 -y |
| 86 | + - name: Install gcc 4.8 if needed |
| 87 | + if: matrix.config.cc == 'gcc-4.8' |
| 88 | + run: | |
| 89 | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
| 90 | + sudo apt update |
| 91 | + sudo apt install g++-4.8 -y |
| 92 | + - name: Install gcc 4.7 if needed |
| 93 | + if: matrix.config.cc == 'gcc-4.7' |
| 94 | + run: | |
| 95 | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
| 96 | + sudo apt update |
| 97 | + sudo apt install g++-4.7 -y |
| 98 | + - name: Install gcc 4.6 if needed |
| 99 | + if: matrix.config.cc == 'gcc-4.6' |
| 100 | + run: | |
| 101 | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
| 102 | + sudo apt update |
| 103 | + sudo apt install g++-4.6 -y |
| 104 | + - name: Install gcc 4.5 if needed |
| 105 | + if: matrix.config.cc == 'gcc-4.5' |
| 106 | + run: | |
| 107 | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
| 108 | + sudo apt update |
| 109 | + sudo apt install g++-4.5 -y |
| 110 | + - name: Install gcc 4.4 if needed |
| 111 | + if: matrix.config.cc == 'gcc-4.4' |
| 112 | + run: | |
| 113 | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
| 114 | + sudo apt update |
| 115 | + sudo apt install g++-4.4 -y |
| 116 | + - name: ./script/ci-install-deps |
| 117 | + env: |
| 118 | + MAKE_OPTS: LIBSASS_CPPSTD=${{ matrix.config.cppstd }} |
| 119 | + run: ./script/ci-install-deps |
| 120 | + - name: ./script/ci-install-compiler |
| 121 | + env: |
| 122 | + MAKE_OPTS: LIBSASS_CPPSTD=${{ matrix.config.cppstd }} |
| 123 | + run: ./script/ci-install-compiler |
| 124 | + - name: ./script/ci-build-libsass |
| 125 | + env: |
| 126 | + MAKE_OPTS: LIBSASS_CPPSTD=${{ matrix.config.cppstd }} |
| 127 | + run: ./script/ci-build-libsass |
| 128 | + |
| 129 | + |
| 130 | + windows-msvc: |
| 131 | + runs-on: windows-latest |
| 132 | + name: Windows MSVC build |
| 133 | + |
| 134 | + strategy: |
| 135 | + fail-fast: false |
| 136 | + matrix: |
| 137 | + config: |
| 138 | + - {build: Release, platform: Win64} |
| 139 | + - {build: Debug, platform: Win64} |
| 140 | + - {build: Release, platform: Win32} |
| 141 | + - {build: Debug, platform: Win32} |
| 142 | + |
| 143 | + steps: |
| 144 | + - name: Change git config to preserve line-endings |
| 145 | + run: | |
| 146 | + git config --system core.autocrlf false |
| 147 | + git config --system core.eol lf |
| 148 | + - uses: actions/checkout@v2 |
| 149 | + - uses: ruby/setup-ruby@v1 |
| 150 | + with: |
| 151 | + ruby-version: 2.6 |
| 152 | + bundler-cache: true |
| 153 | + - name: Install ruby hrx module |
| 154 | + run: gem install hrx |
| 155 | + - name: Install ruby minitest module |
| 156 | + run: gem install minitest |
| 157 | + - name: Add msbuild to PATH |
| 158 | + |
| 159 | + - name: Clone and checkout sassc repository |
| 160 | + run: git clone https://github.com/sass/sassc.git |
| 161 | + - name: Clone and checkout sass-spec repository |
| 162 | + run: git clone https://github.com/sass/sass-spec.git |
| 163 | + - 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 |
| 165 | + - name: Execute spec test runner |
| 166 | + run: ruby sass-spec/sass-spec.rb --probe-todo --impl libsass -c sassc/bin/sassc.exe -s sass-spec/spec |
| 167 | + |
| 168 | + windows-mingw: |
| 169 | + runs-on: windows-latest |
| 170 | + name: Windows MinGW build |
| 171 | + |
| 172 | + strategy: |
| 173 | + fail-fast: false |
| 174 | + matrix: |
| 175 | + config: |
| 176 | + - {build: shared, platform: x64} |
| 177 | + - {build: static, platform: x64} |
| 178 | + - {build: shared, platform: x86} |
| 179 | + - {build: static, platform: x86} |
| 180 | + |
| 181 | + steps: |
| 182 | + - name: Change git config to preserve line-endings |
| 183 | + run: | |
| 184 | + git config --system core.autocrlf false |
| 185 | + git config --system core.eol lf |
| 186 | + - uses: actions/checkout@v2 |
| 187 | + - uses: ruby/setup-ruby@v1 |
| 188 | + with: |
| 189 | + ruby-version: 2.6 |
| 190 | + bundler-cache: true |
| 191 | + - name: Set up MinGW |
| 192 | + uses: egor-tensin/setup-mingw@v2 |
| 193 | + with: |
| 194 | + platform: ${{ matrix.config.platform }} |
| 195 | + - name: Install ruby hrx module |
| 196 | + run: gem install hrx |
| 197 | + - name: Install ruby minitest module |
| 198 | + run: gem install minitest |
| 199 | + - name: Clone and checkout sassc repository |
| 200 | + run: git clone https://github.com/sass/sassc.git |
| 201 | + - 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 |
| 206 | + - name: Compile libsass ${{ matrix.config.build }} build for ${{ matrix.config.platform }} |
| 207 | + run: make ${{ matrix.config.build }} BUILD=${{ matrix.config.build }} |
| 208 | + - name: Copy library over to pass call test |
| 209 | + if: matrix.config.build == 'shared' |
| 210 | + run: copy /a/libsass/libsass/lib/libsass.dll sassc/bin/ |
| 211 | + - name: Compile sassc ${{ matrix.config.build }} build for ${{ matrix.config.platform }} |
| 212 | + run: make sassc BUILD=${{ matrix.config.build }} |
| 213 | + - name: Execute spec test runner |
| 214 | + run: ruby sass-spec/sass-spec.rb --probe-todo --impl libsass -c sassc/bin/sassc.exe -s sass-spec/spec |
| 215 | + |
| 216 | + |
| 217 | +#- name: Install LLVM and Clang |
| 218 | +# uses: KyleMayes/[email protected] |
0 commit comments