diff options
| author | Alex Dunn <[email protected]> | 2022-04-08 09:37:54 -0700 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-04-12 09:57:09 +0200 |
| commit | 640e8fd6a143c0fe9bc87da5da1e5118a2ace74f (patch) | |
| tree | 9a60e2cb8a95a93722fd6f867d9cbbd0e46e1b88 /.github/workflows | |
| parent | do tests inline with build (diff) | |
| download | zen-640e8fd6a143c0fe9bc87da5da1e5118a2ace74f.tar.xz zen-640e8fd6a143c0fe9bc87da5da1e5118a2ace74f.zip | |
Running linux build test
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/on_prem_windows.yml | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/.github/workflows/on_prem_windows.yml b/.github/workflows/on_prem_windows.yml index b60999c74..80b8fb0cf 100644 --- a/.github/workflows/on_prem_windows.yml +++ b/.github/workflows/on_prem_windows.yml @@ -8,6 +8,30 @@ on: branches: [ main ] jobs: + clang-format: + name: Check clang-format + runs-on: [self-hosted, linux, x64] + strategy: + matrix: + path: + - 'zen' + - 'zencore' + - 'zencore-test' + - 'zenhttp' + - 'zenserver' + - 'zenserver-test' + - 'zenstore' + - 'zenstore-test' + - 'zentest-appstub' + - 'zenutil' + steps: + - uses: actions/checkout@v2 + - name: clang-format ${{ matrix.path }} + uses: jidicula/[email protected] + with: + clang-format-version: '12' + check-path: ${{ matrix.path }} + windows-build: name: Build Windows runs-on: [self-hosted, windows, x64] @@ -55,3 +79,117 @@ jobs: xmake test -v -y env: VCPKG_ROOT: ${{ github.workspace }}/.vcpkg + + linux-build: + name: Build Linux + runs-on: [self-hosted, linux, x64] + strategy: + matrix: + config: + - 'debug' + - 'release' + arch: + - 'x86_64' + env: + VCPKG_VERSION: 2022.03.10 + + steps: + - uses: actions/checkout@v2 + + - name: Set up GCC 11 + uses: egor-tensin/setup-gcc@v1 + with: + version: 11 + platform: x64 + + - name: Setup xmake + uses: xmake-io/github-action-setup-xmake@v1 + with: + xmake-version: 2.6.4 + + - name: Installing vcpkg + run: | + git clone -b ${{env.VCPKG_VERSION}} --single-branch https://github.com/Microsoft/vcpkg.git .vcpkg + cd .vcpkg + ./bootstrap-vcpkg.sh + cd .. + + - name: Cache vcpkg + uses: actions/cache@v2 + with: + path: | + ${{ github.workspace }}/.vcpkg/installed + key: ${{ runner.os }}-${{ matrix.config }}-${{env.VCPKG_VERSION}}-${{ hashFiles('xmake.lua') }}-${{ matrix.arch }}-v5 + + - name: Config + run: | + xmake config -v -y -m ${{ matrix.config }} --arch=${{ matrix.arch }} + env: + VCPKG_ROOT: ${{ github.workspace }}/.vcpkg + + - name: Build + run: | + xmake build -v -y + env: + VCPKG_ROOT: ${{ github.workspace }}/.vcpkg + + - name: Create Archive + run: | + cd ./build/linux/${{ matrix.arch }}/${{ matrix.config }} + zip -r ../../../../linux-${{ matrix.arch }}-${{ matrix.config }}.zip * + cd ../../../.. + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: linux-${{ matrix.arch }}-${{ matrix.config }} + path: ./linux-${{ matrix.arch }}-${{ matrix.config }}.zip + if-no-files-found: error + + linux-test: + name: Test Linux + runs-on: [self-hosted, linux, x64] + needs: linux-build + strategy: + matrix: + config: + - 'debug' + arch: + - 'x86_64' + test: + - zencore-test + - zenserver + - zenserver-test + - zenstore-test + include: + - test: "zenserver" + args: "test" + - test: "zenserver-test" + args: "--test-case-exclude=websocket.basic" + + steps: + - if: ${{ matrix.test == 'zenserver-test' }} + uses: actions/checkout@v2 + + # Temporary workaround since we need libstdc++.so.6 + - name: Set up GCC 11 + uses: egor-tensin/setup-gcc@v1 + with: + version: 11 + platform: x64 + + - name: Download + uses: actions/download-artifact@v3 + with: + name: linux-${{ matrix.arch }}-${{ matrix.config }} + + - name: Extract Archive + run: | + mkdir -p ./build/linux/${{ matrix.arch }}/${{ matrix.config }} + cd ./build/linux/${{ matrix.arch }}/${{ matrix.config }} + 7z x ../../../../linux-${{ matrix.arch }}-${{ matrix.config }}.zip + cd ../../../.. + + - name: Test ${{matrix.test}} + run: | + ./build/linux/${{ matrix.arch }}/${{ matrix.config }}/${{ matrix.test }} ${{ matrix.args }} |