http-parser.c

Small C library to parse HTTP requests
Log | Files | Refs | README | LICENSE

cc.yml (2772B)


      1 ---
      2 
      3 name: Build
      4 on:
      5   push:
      6     tags:
      7       - '*'
      8 
      9 jobs:
     10 
     11   build-windows:
     12     name: Build & test
     13     runs-on: ${{ matrix.os }}
     14     strategy:
     15       matrix:
     16         include:
     17           - os: windows-latest
     18             cc: clang
     19             bin: http-parser-test.exe
     20     steps:
     21       - uses: actions/checkout@v3
     22 
     23       - shell: bash
     24         run: |
     25           echo "/c/msys64/mingw64/bin" >> $GITHUB_PATH
     26 
     27       - uses: finwo/dep@main
     28         name: Install dep
     29 
     30       - name: Install dependencies
     31         run: dep install
     32         shell: bash
     33 
     34       - name: Build & check
     35         shell: bash
     36         run: |
     37           make CC=${{ matrix.cc }} BIN=${{ matrix.bin }}
     38           make check CC=${{ matrix.cc }} BIN=${{ matrix.bin }}
     39 
     40       - name: Upload binaries to release
     41         uses: svenstaro/upload-release-action@v2
     42         with:
     43           repo_token: ${{ secrets.GITHUB_TOKEN }}
     44           file: ${{ matrix.bin }}
     45           file_glob: true
     46           overwrite: true
     47           tag: ${{ github.ref }}
     48 
     49   build-linux:
     50     name: Build & test
     51     runs-on: ubuntu-latest
     52     strategy:
     53       matrix:
     54         include:
     55 
     56           - distro: ubuntu_latest
     57             arch: aarch64
     58             cc: gcc
     59             bin: http-parser-test-aarch64
     60 
     61           - distro: ubuntu_latest
     62             arch: armv7
     63             cc: gcc
     64             bin: http-parser-test-armv7
     65 
     66           - distro: ubuntu_latest
     67             arch: riscv64
     68             cc: gcc
     69             bin: http-parser-test-riscv64
     70 
     71           - distro: ubuntu_latest
     72             arch: none
     73             cc: gcc
     74             bin: http-parser-test-x86_64
     75 
     76     steps:
     77 
     78       - uses: actions/checkout@v3
     79 
     80       - uses: finwo/dep@main
     81         name: Install dep
     82 
     83       - name: Install dependencies
     84         run: dep install
     85         shell: bash
     86 
     87       - if: ${{ matrix.arch != 'none' }}
     88         uses: uraimo/run-on-arch-action@v2
     89         name: Build & check
     90         id: runcmd
     91         with:
     92           arch: ${{ matrix.arch }}
     93           distro: ${{ matrix.distro }}
     94           githubToken: ${{ github.token }}
     95 
     96           install: |
     97             apt-get update -yq
     98             apt-get install -yq build-essential
     99 
    100           run: |
    101             make CC=${{ matrix.cc }} BIN=${{ matrix.bin }}
    102             make check CC=${{ matrix.cc }} BIN=${{ matrix.bin }}
    103 
    104       - if: ${{ matrix.arch == 'none' }}
    105         name: Build
    106         shell: bash
    107         run: |
    108           make CC=${{ matrix.cc }} BIN=${{ matrix.bin }}
    109           make check CC=${{ matrix.cc }} BIN=${{ matrix.bin }}
    110 
    111       - name: Upload binaries to release
    112         uses: svenstaro/upload-release-action@v2
    113         with:
    114           repo_token: ${{ secrets.GITHUB_TOKEN }}
    115           file: ${{ matrix.bin }}
    116           file_glob: true
    117           overwrite: true
    118           tag: ${{ github.ref }}