aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/cpp-ci.yml
blob: 7807a93ba30bb589a458cab72d9bc6c53c9c3738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Build and Test

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
  # This allows manually running CI through the github ui
  workflow_dispatch:

jobs:
  build:

    runs-on: ubuntu-latest

    env:
      CXX: clang++-12
      CLANG_FORMAT: clang-format-12

    steps:
    - uses: actions/checkout@v2
    - name: install ninja
      run: |
        mkdir -p ${GITHUB_WORKSPACE}/ninja-bin; cd ${GITHUB_WORKSPACE}/ninja-bin
        wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
        unzip ninja-linux.zip
        rm ninja-linux.zip
        echo "${GITHUB_WORKSPACE}/ninja-bin" >> "$GITHUB_PATH"
    - name: install GNU Make
      run: |
        mkdir -p ${GITHUB_WORKSPACE}/make-bin/tmp; cd ${GITHUB_WORKSPACE}/make-bin/tmp
        wget http://mirrors.kernel.org/ubuntu/pool/main/m/make-dfsg/make_4.2.1-1.2_amd64.deb
        ar xv make_4.2.1-1.2_amd64.deb
        tar xf data.tar.xz
        mv usr/bin/make ../
        cd ..
        rm -rf tmp/
        echo "${GITHUB_WORKSPACE}/make-bin" >> "$GITHUB_PATH"
    - name: make info
      run: make info
    - name: make
      run: make -j4 ckati ckati_tests
    - name: clang format
      run: ./clang-format-check
    - name: run standalone tests
      run: go test
    - name: run ninja tests
      run: go test --ninja
    - name: run ninja all targets tests
      run: go test --ninja --all
    - name: run ninja unit tests
      run: ./ninja_test
    - name: run strutil unit tests
      run: ./strutil_test
    - name: run find unit tests
      run: ./find_test
    - name: run JSON dump tests
      run: testcase/dump/run.sh