name: CI on: [push, pull_request] jobs: build: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: # Useful info: https://help.github.com/en/articles/workflow-syntax-for-github-actions include: - name: ubuntu-clang os: ubuntu-16.04 compiler: clang - name: windows-clang os: windows-2019 compiler: clang-cl - name: macos-clang os: macos-10.15 compiler: clang steps: - name: Configure Git # We add -l to process .bashrc, but need -e -o pipefail for consistency with GitHub Actions's default behavior. shell: bash -e -o pipefail -l {0} run: | git config --global core.symlinks true && git config --global core.autocrlf false if command -v dpkg > /dev/null; then sudo dpkg-reconfigure debconf -f noninteractive -p high; fi - name: Checkout repository uses: actions/checkout@v2 with: fetch-depth: 1 - name: Setup Bazel shell: bash -e -o pipefail -l {0} env: BAZEL_CACHE_CREDENTIAL_B64: ${{ secrets.BAZEL_CACHE_CREDENTIAL_B64 }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./ci/travis/install-bazel.sh - name: Install C/C++ toolchains shell: bash -e -o pipefail -l {0} env: CC: ${{ matrix.compiler }} run: ./ci/travis/install-toolchains.sh "${CC%%-*}" - name: Install MSYS2 (only needed if some shell commands are missing) if: false && runner.os == 'Windows' uses: numworks/setup-msys2@v1 with: update: false - name: Perform build shell: bash -e -o pipefail -l {0} run: | bazel build \ --keep_going \ "//:*" - name: Run Clang Include-What-You-Use continue-on-error: true if: runner.os == 'Linux' shell: bash -e -o pipefail -l {0} run: | sudo apt-get install -qq -o=Dpkg::Use-Pty=0 iwyu bazel build \ --keep_going \ --config=iwyu \ "//:*"