|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 3 | +# or more contributor license agreements. See the NOTICE file |
| 4 | +# distributed with this work for additional information |
| 5 | +# regarding copyright ownership. The ASF licenses this file |
| 6 | +# to you under the Apache License, Version 2.0 (the |
| 7 | +# "License"); you may not use this file except in compliance |
| 8 | +# with the License. You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, |
| 13 | +# software distributed under the License is distributed on an |
| 14 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | +# KIND, either express or implied. See the License for the |
| 16 | +# specific language governing permissions and limitations |
| 17 | +# under the License. |
| 18 | +# |
| 19 | + |
| 20 | +name: Test ambiguous config |
| 21 | + |
| 22 | +on: [push, pull_request] |
| 23 | + |
| 24 | +jobs: |
| 25 | + test_ambiguous_cfg: |
| 26 | + name: other |
| 27 | + strategy: |
| 28 | + fail-fast: false |
| 29 | + matrix: |
| 30 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 31 | + runs-on: ${{ matrix.os }} |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v3 |
| 34 | + - uses: actions/setup-go@v3 |
| 35 | + with: |
| 36 | + go-version: 'stable' |
| 37 | + - uses: carlosperate/arm-none-eabi-gcc-action@48db4484a55750df7a0ccca63347fcdea6534d78 |
| 38 | + with: |
| 39 | + release: '12.2.Rel1' |
| 40 | + - name: Install Dependencies |
| 41 | + if: matrix.os == 'ubuntu-latest' |
| 42 | + run: | |
| 43 | + sudo apt-get update |
| 44 | + sudo apt-get install -y gcc-multilib |
| 45 | + - name: Build newt |
| 46 | + working-directory: newt |
| 47 | + shell: bash |
| 48 | + run: | |
| 49 | + go version |
| 50 | + go build |
| 51 | + echo ${GITHUB_WORKSPACE}/newt >> $GITHUB_PATH |
| 52 | + - name: Test ambiguous cfg (success) |
| 53 | + shell: bash |
| 54 | + run: | |
| 55 | + newt new project |
| 56 | + cp -r .github/targets/ambiguous_success project/targets |
| 57 | + cd project/ |
| 58 | + newt upgrade -v |
| 59 | + newt build ambiguous_success |
| 60 | + - name: Test ambiguous cfg (fail) |
| 61 | + shell: bash |
| 62 | + run: | |
| 63 | + cp -r .github/targets/ambiguous_fail project/targets |
| 64 | + cd project/ |
| 65 | + ! newt build ambiguous_fail &> tmp.txt |
| 66 | + grep "Error: Setting CONSOLE_IMPLEMENTATION collision - two conditions true:" tmp.txt -q |
0 commit comments