commit fb2ae86b902cac33d7ceafb7e787c467e553f326 parent 14baeb2ab0c27c0178796b70df8ce021f036f8da Author: Yersa Nordman <yersa@finwo.nl> Date: Sun, 22 Oct 2023 20:12:57 +0200 Added workflow to test build in ci Diffstat:
| A | .github/workflows/build.yml | | | 108 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 108 insertions(+), 0 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml @@ -0,0 +1,108 @@ +--- + +name: Build +on: + push: + # tags: + # - '*' + +jobs: + + # build-windows: + # name: Build + # runs-on: ${{ matrix.os }} + # strategy: + # matrix: + # include: + # - os: windows-latest + # cc: clang + # steps: + # - uses: actions/checkout@v3 + + # - name: Install dependencies (windows) + # run: | + # mkdir external + # mkdir external\\tools + # mkdir external\\libs + # curl -sSLo "external\\tools\\nuget.exe" https://dist.nuget.org/win-x86-commandline/latest/nuget.exe + # external\\tools\\nuget install Microsoft.Web.Webview2 -Verbosity quiet -Version "1.0.1150.38" -OutputDirectory "external\\libs" || exit /b 1 + + # - 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 + # run: make CC=${{ matrix.cc }} CPP=${{ matrix.cpp }} BIN=${{ matrix.bin }} + # shell: bash + + # - 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 + runs-on: ubuntu-latest + strategy: + matrix: + include: + + - distro: ubuntu_latest + arch: aarch64 + cc: gcc + + - distro: ubuntu_latest + arch: armv7 + cc: gcc + + - distro: ubuntu_latest + arch: riscv64 + cc: gcc + + - distro: ubuntu_latest + arch: none + cc: gcc + + steps: + + - uses: actions/checkout@v3 + + - 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 }} + + - if: ${{ matrix.arch == 'none' }} + name: Build + shell: bash + run: | + make CC=${{ matrix.cc }}