| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- # Exceptions. See /LICENSE for license information.
- # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- name: test
- on:
- push:
- branches: [trunk]
- pull_request:
- jobs:
- test:
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest]
- build_mode: [fastbuild, opt]
- runs-on: ${{ matrix.os }}
- steps:
- - name: Checkout
- uses: actions/checkout@v2
- with:
- submodules: true
- # Setup Python and related tools.
- - uses: actions/setup-python@v2
- with:
- python-version: '3.8.5'
- - name: Install python modules
- run: |
- pip install gql PyGitHub
- # On macOS we need Go and to use it to install Bazelisk.
- - uses: actions/setup-go@v2
- if: matrix.os == 'macos-latest'
- - name: Install bazelisk
- if: matrix.os == 'macos-latest'
- run: |
- go get github.com/bazelbuild/bazelisk
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- # Print the various tool versions to help in debugging.
- - name: Print tool versions
- run: |
- bazelisk --version
- python --version
- echo gql "$(pip show gql | grep Version)"
- echo PyGitHub "$(pip show PyGitHub | grep Version)"
- # Build all targets first to isolate build failures.
- - name: Build (${{ matrix.build_mode }})
- run: |
- bazelisk build -c ${{ matrix.build_mode }} --verbose_failures \
- //...:all
- # Run all test targets.
- - name: Test (${{ matrix.build_mode }})
- run: |
- bazelisk test -c ${{ matrix.build_mode }} --test_output errors \
- --verbose_failures //...:all
|