diff options
Diffstat (limited to '.github/workflows/validate.yml')
| -rw-r--r-- | .github/workflows/validate.yml | 74 |
1 files changed, 72 insertions, 2 deletions
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 7ceec353b..1a6cd7ddc 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -44,7 +44,7 @@ jobs: needs: cancel-old-build name: Build & Test Windows runs-on: [self-hosted, windows, x64] - timeout-minutes: 10 + timeout-minutes: 15 strategy: matrix: config: @@ -109,7 +109,7 @@ jobs: needs: cancel-old-build name: Build & Test Linux runs-on: [self-hosted, linux, x64] - timeout-minutes: 10 + timeout-minutes: 15 strategy: matrix: config: @@ -174,3 +174,73 @@ jobs: xmake test -v -y env: VCPKG_ROOT: ${{ github.workspace }}/.vcpkg + + macos-build: + needs: cancel-old-build + name: Build & Test MacOS + runs-on: [self-hosted, macos, x64] + timeout-minutes: 15 + strategy: + matrix: + config: + - 'debug' + - 'release' + arch: + - 'x86_64' + env: + VCPKG_VERSION: 2022.03.10 + + steps: + - name: Checkout + 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: Bundle + if: ${{ github.ref_name == 'main' && matrix.config == 'release' }} + run: | + xmake bundle -v -y + env: + VCPKG_ROOT: ${{ github.workspace }}/.vcpkg + + - name: Upload zenserver-macos + if: ${{ github.ref_name == 'main' && matrix.config == 'release' }} + uses: actions/upload-artifact@v3 + with: + name: zenserver-macos + path: build/zenserver-macos.zip + + - name: Config + run: | + xmake config -v -y -m ${{ matrix.config }} --arch=${{ matrix.arch }} + env: + VCPKG_ROOT: ${{ github.workspace }}/.vcpkg + + - name: Build & Test + run: | + xmake test -v -y + env: + VCPKG_ROOT: ${{ github.workspace }}/.vcpkg |