aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/self_host_build.yml
diff options
context:
space:
mode:
authorAlex Dunn <[email protected]>2022-04-15 14:03:23 -0700
committerGitHub <[email protected]>2022-04-15 14:03:23 -0700
commit36cf26ae05a4db0353cac115d3e596c0fde44f6c (patch)
treea68edb75c1221e4246612dd2fe36da9a49c00f8b /.github/workflows/self_host_build.yml
parentHorde execute storage config (#75) (diff)
parentMaking changes to the CI/CD pipeline and adding release automation for PR mer... (diff)
downloadzen-1.0.0.2.tar.xz
zen-1.0.0.2.zip
Merge pull request #76 from EpicGames/ci_updatesv1.0.0.2
Making changes to the CI/CD pipeline and adding release automation
Diffstat (limited to '.github/workflows/self_host_build.yml')
-rw-r--r--.github/workflows/self_host_build.yml134
1 files changed, 134 insertions, 0 deletions
diff --git a/.github/workflows/self_host_build.yml b/.github/workflows/self_host_build.yml
new file mode 100644
index 000000000..2645f9738
--- /dev/null
+++ b/.github/workflows/self_host_build.yml
@@ -0,0 +1,134 @@
+name: Validate Build
+
+on:
+ pull_request:
+ types: [opened, reopened]
+ branches: [ main ]
+
+jobs:
+ clang-format:
+ name: Check clang-format
+ runs-on: [self-hosted, linux, x64]
+ strategy:
+ matrix:
+ path:
+ - 'zen'
+ - 'zencore'
+ - 'zencore-test'
+ - 'zenhttp'
+ - 'zenserver-test'
+ - 'zenstore'
+ - 'zenstore-test'
+ - 'zentest-appstub'
+ - 'zenutil'
+ - 'zenserver'
+ steps:
+ - uses: actions/checkout@v2
+ - name: clang-format ${{ matrix.path }}
+ uses: jidicula/[email protected]
+ with:
+ clang-format-version: '13'
+ check-path: ${{ matrix.path }}
+
+ windows-build:
+ name: Build Windows
+ needs: clang-format
+ runs-on: [self-hosted, windows, x64]
+ 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 & Test
+ run: |
+ xmake test -v -y
+ env:
+ VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
+
+ linux-build:
+ name: Build Linux
+ needs: clang-format
+ 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 & Test
+ run: |
+ xmake test -v -y
+ env:
+ VCPKG_ROOT: ${{ github.workspace }}/.vcpkg