• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# GitHub actions workflow.
2# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
3
4name: Build+Test CI
5
6on:
7  push:
8    branches: [main]
9
10  schedule:
11    # The GH mirroring from Google GoB does not trigger push actions.
12    # Fire it every other day to provide some coverage.  This will run ~8 AM PT.
13    - cron: '39 3 */2 * *'
14
15  # Allow for manual triggers from the web.
16  workflow_dispatch:
17
18jobs:
19  autotools:
20    strategy:
21      fail-fast: false
22      matrix:
23        include:
24          - os: ubuntu-latest
25            cc: gcc
26            cxx: g++
27          - os: ubuntu-latest
28            cc: clang
29            cxx: clang++
30          - os: macos-latest
31            cc: clang
32            cxx: clang++
33    runs-on: ${{ matrix.os }}
34    env:
35      CC: ${{ matrix.cc }}
36      CXX: ${{ matrix.cxx }}
37
38    steps:
39    - name: System settings
40      run: |
41        set -x
42        $CC --version
43        $CXX --version
44        getconf _NPROCESSORS_ONLN
45        getconf _NPROCESSORS_CONF
46        true
47
48    - name: Checkout depot_tools
49      run: git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git ../depot_tools
50
51    - name: Checkout breakpad
52      run: |
53        set -xe
54        PATH+=:$PWD/../depot_tools
55        gclient config --unmanaged --name=src https://github.com/${{ github.repository }}
56        gclient sync --no-history --nohooks
57
58    # First build & test in-tree.
59    - run: ./configure --disable-silent-rules
60      working-directory: src
61    - run: make -j$(getconf _NPROCESSORS_CONF)
62      working-directory: src
63    - run: make -j$(getconf _NPROCESSORS_CONF) check VERBOSE=1
64      working-directory: src
65    - run: make -j$(getconf _NPROCESSORS_CONF) distclean
66      working-directory: src
67
68    # Then build & test out-of-tree.
69    - run: mkdir -p src/build/native
70    - run: ../../configure --disable-silent-rules
71      working-directory: src/build/native
72    - run: make -j$(getconf _NPROCESSORS_CONF) distcheck VERBOSE=1
73      working-directory: src/build/native
74