commit de1e566e2919c1e4683a3e97c736d71c4ea166ea parent d31f50189ea4b8ea87a59e6567b666ad972fda4d Author: Yersa Nordman <yersa@finwo.nl> Date: Tue, 24 Oct 2023 20:46:54 +0200 Add build for windows in CI Diffstat:
| M | .github/workflows/cc.yml | | | 120 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- |
1 file changed, 110 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/cc.yml b/.github/workflows/cc.yml @@ -1,18 +1,118 @@ --- -name: C/C++ CI - -on: [push] +name: Build +on: + push: + # tags: + # - '*' jobs: - build: - name: Verify build + build-windows: + name: Build + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: windows-latest + cc: clang + bin: http-server-test.exe + steps: + - uses: actions/checkout@v3 + + - shell: bash + run: | + echo "/c/msys64/mingw64/bin" >> $GITHUB_PATH + + - uses: finwo/dep@main + name: Install dep + + - name: Install dependencies + run: dep install + shell: bash + + - name: Build + shell: bash + run: | + make CC=${{ matrix.cc }} BIN=${{ matrix.bin }} + # make check CC=${{ matrix.cc }} BIN=${{ matrix.bin }} + + # - name: Upload binaries to release + # uses: svenstaro/upload-release-action@v2 + # with: + # repo_token: ${{ secrets.GITHUB_TOKEN }} + # file: ${{ matrix.bin }} + # file_glob: true + # overwrite: true + # tag: ${{ github.ref }} + + build-linux: + name: Build & test runs-on: ubuntu-latest + strategy: + matrix: + include: + + - distro: ubuntu_latest + arch: aarch64 + cc: gcc + bin: http-server-test-aarch64 + + - distro: ubuntu_latest + arch: armv7 + cc: gcc + bin: http-server-test-armv7 + + - distro: ubuntu_latest + arch: riscv64 + cc: gcc + bin: http-server-test-riscv64 + + - distro: ubuntu_latest + arch: none + cc: gcc + bin: http-server-test-x86_64 + steps: + - uses: actions/checkout@v3 - - uses: finwo/dep@edge - - run : dep install - - run : make clean - - run : make - # - run : ./benchmark + + - uses: finwo/dep@main + name: Install dep + + - name: Install dependencies + run: dep install + shell: bash + + - if: ${{ matrix.arch != 'none' }} + uses: uraimo/run-on-arch-action@v2 + name: Build + id: runcmd + with: + arch: ${{ matrix.arch }} + distro: ${{ matrix.distro }} + githubToken: ${{ github.token }} + + install: | + apt-get update -yq + apt-get install -yq build-essential + + run: | + make CC=${{ matrix.cc }} BIN=${{ matrix.bin }} + # make check CC=${{ matrix.cc }} BIN=${{ matrix.bin }} + + - if: ${{ matrix.arch == 'none' }} + name: Build + shell: bash + run: | + make CC=${{ matrix.cc }} BIN=${{ matrix.bin }} + # make check CC=${{ matrix.cc }} BIN=${{ matrix.bin }} + + # - name: Upload binaries to release + # uses: svenstaro/upload-release-action@v2 + # with: + # repo_token: ${{ secrets.GITHUB_TOKEN }} + # file: ${{ matrix.bin }} + # file_glob: true + # overwrite: true + # tag: ${{ github.ref }}