fnet.c

Simple C networking library
git clone git://git.finwo.net/lib/fnet.c
Log | Files | Refs | README

build.yml (2504B)


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