Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ccpp.yml « workflows « .github - github.com/P-p-H-d/mlib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a99d18f8346ed24b67fcde4b24062b814bb990ef (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: C/C++ CI

on: [push, pull_request]

jobs:
  build:
    strategy:
      matrix:
        platform: [ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.platform }}
    
    steps:
    - uses: actions/checkout@v4
    - name: CPU Information
      run:  lscpu || sysctl -a|grep cpu || echo "CPU information not available"
    - name: make check C99
      run: make clean && make check -j 2 CC="cc -std=c99 -Wno-unknown-warning-option -Werror"
    - name: make check C11
      working-directory: ./tests
      run: make clean && make check -j 2 CC="cc -std=c11 -Wno-unknown-warning-option -Werror"
    - name: make check C++
      working-directory: ./tests
      run: make clean && make check -j 2 CC="c++ -std=c++11"

  build_linux32:
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v4
    - name: update package list
      run: sudo apt-get update
    - name: install multilib
      run: sudo apt-get install gcc-multilib g++-multilib
    - name: CPU Information
      run:  lscpu || echo "CPU information not available"
    - name: make check C99 (32bits)
      working-directory: ./tests
      run: make clean && make check -j 2 CC="gcc -m32 -std=c99 -Wno-unknown-warning-option -Werror"
    - name: make check C11 (32bits)
      working-directory: ./tests
      run: make clean && make check -j 2 CC="gcc -m32 -std=c11 -Wno-unknown-warning-option -Werror"
    - name: make check C++ (32 bits)
      working-directory: ./tests
      run: make clean && make check -j 2 CC="g++ -m32 -std=c++11 -Wno-unknown-warning-option "
    - name: make check against C++ STL
      working-directory: ./tests
      run: make clean && make check-stl -j 2
 
  build_linux_tcc:
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v4
    - name: CPU Information
      run:  lscpu || echo "CPU information not available"
    - name: Clone TCC
      shell: bash
      run:  git clone https://repo.or.cz/tinycc.git
    - name: Configure, build & install TCC
      shell: bash
      run:  cd tinycc && ./configure --prefix=/tmp/tcc && make && make install
    - name: make depend
      shell: bash
      run: make depend
    - name: make check
      shell: bash
      run: make CC="/tmp/tcc/bin/tcc -std=c99" check

  build_linux_sanitize:
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v4
    - name: make sanitize
      working-directory: ./tests
      run: make sanitize -j 2

  build_windows_mingw:
    runs-on: windows-latest
    
    steps:
    - uses: actions/checkout@v4
    - name: make check
      shell: bash
      run: mingw32-make -j 2 CC="gcc -std=c99 -D__USE_MINGW_ANSI_STDIO=1" check

  build_windows_msys2:
    runs-on: windows-latest
    defaults:
      run:
        shell: msys2 {0}    
    steps:
    - uses: actions/checkout@v4
    - uses: msys2/setup-msys2@v2
      with:
          msystem: MINGW64
          update: true
          install: git mingw-w64-x86_64-toolchain make
    - name: make check
      run: make -j 2 CC="gcc -std=c99 -D__USE_MINGW_ANSI_STDIO=1" check

  build_windows_visual:
    runs-on: windows-latest
    
    steps:
    - uses: actions/checkout@v4
    - name: make check
      shell: cmd
      working-directory: ./tests
      run: Make-check-cl.bat cl
      
  build_windows_clang_cl:
    runs-on: windows-latest
    
    steps:
    - uses: actions/checkout@v4
    - name: make check
      shell: cmd
      working-directory: ./tests
      run: Make-check-cl.bat clang-cl

    # The host should always be linux
  build_freebsd:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Test in FreeBSD
      id: test
      uses: vmactions/freebsd-vm@v1
      timeout-minutes: 60
      with:
        usesh: true
        run: |
             freebsd-version
             cd tests
             make check -j 2 CC="cc -std=c99 -Wno-unknown-warning-option -Werror" && make clean && make check -j 2 CC="cc -std=c11 -Wno-unknown-warning-option -Werror" LDFLAGS="-lstdthreads" && make clean

    # The host should always be linux
  build_aarch64:
    runs-on: ubuntu-latest
    name: Build on aarch64
    steps:
      - uses: actions/checkout@v4
      - uses: uraimo/run-on-arch-action@v2.5.0
        name: Run commands on aarch64
        id: make
        timeout-minutes: 60
        with:
          arch: aarch64
          distro: bullseye
          shell: /bin/sh
          run: |
            apt-get update -q -y
            apt-get install -q -y  build-essential git gcc
            lscpu
            cd tests && make check -j 2 && make clean