diff options
| author | Alex Dunn <[email protected]> | 2022-04-04 11:38:12 -0700 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-04-12 09:57:09 +0200 |
| commit | e23a43dc9c590fb69fa772e4225543a6d500d79c (patch) | |
| tree | b06750b708aaaeb0210477ef2b89326267707e24 /.github/workflows | |
| parent | Merge pull request #58 from EpicGames/de/cas-store-with-block-store (diff) | |
| download | zen-e23a43dc9c590fb69fa772e4225543a6d500d79c.tar.xz zen-e23a43dc9c590fb69fa772e4225543a6d500d79c.zip | |
Testing just windows self-hosted runner using on-prem test box
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/on_prem_windows.yml | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/.github/workflows/on_prem_windows.yml b/.github/workflows/on_prem_windows.yml new file mode 100644 index 000000000..1aef1404b --- /dev/null +++ b/.github/workflows/on_prem_windows.yml @@ -0,0 +1,112 @@ +name: Validate + +on: + push: + branches: + - main + pull_request: + branches: [ main ] + +jobs: + windows-build: + name: Build Windows + runs-on: self-hosted + strategy: + matrix: + config: + - 'debug' + - 'release' + arch: + - 'x64' + env: + VCPKG_VERSION: 2022.03.10 + + steps: + - uses: actions/checkout@v2 + + - 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.bat + .\vcpkg.exe integrate install + 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\windows\${{ matrix.arch }}\${{ matrix.config }} + 7z a -r ..\..\..\..\windows-${{ matrix.arch }}-${{ matrix.config }}.zip * + cd ..\..\..\.. + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: windows-${{ matrix.arch }}-${{ matrix.config }} + path: .\windows-${{ matrix.arch }}-${{ matrix.config }}.zip + if-no-files-found: error + + windows-test: + name: Test Windows + runs-on: windows-2022 + needs: windows-build + strategy: + matrix: + config: + - 'debug' + - 'release' + arch: + - 'x64' + 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 + + - name: Download + uses: actions/download-artifact@v3 + with: + name: windows-${{ matrix.arch }}-${{ matrix.config }} + + - name: Extract Archive + run: | + mkdir -p .\build\windows\${{ matrix.arch }}\${{ matrix.config }} + cd .\build\windows\${{ matrix.arch }}\${{ matrix.config }} + 7z x ..\..\..\..\windows-${{ matrix.arch }}-${{ matrix.config }}.zip + cd ..\..\..\.. + + - name: Test ${{matrix.test}} + run: | + .\build\windows\${{ matrix.arch }}\${{ matrix.config }}\${{ matrix.test }}.exe ${{ matrix.args }} |