From 66f19e8681650beb84496f0f7eba1b416e1f4df4 Mon Sep 17 00:00:00 2001 From: MeFisto94 Date: Sat, 23 Dec 2023 11:37:48 +0100 Subject: [PATCH] CI: Also add a client build --- .github/workflows/build.yml | 50 +++++++++++++++++++++++++++++ .github/workflows/docker-server.yml | 22 ------------- 2 files changed, 50 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/docker-server.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6a29deb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,50 @@ +name: CI Build +on: + push: + branches: [ "master", "feature/ci" ] + pull_request: + branches: [ "master" ] + +jobs: + docker-server: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Copying the protocol files + run: cp -rv shared/protocol server/protocol + - uses: satackey/action-docker-layer-caching@v0.0.11 + continue-on-error: true + - name: Build the Docker image + working-directory: server + run: docker build . --file Dockerfile --tag cyberverse-server:$(date +%s) + + client: + runs-on: windows-latest + + env: + VCPKG_DEFAULT_TRIPLET: x64-windows + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: lukka/get-cmake@latest + - name: Setup vcpkg + uses: lukka/run-vcpkg@main + id: runvcpkg + with: + # The vcpkg.json file, which will be part of cache key computation. + vcpkgJsonGlob: 'server/Native/vcpkg.json' + - name: Run CMake with vcpkg.json manifest + uses: lukka/run-cmake@v10 + with: + cmakeListsTxtPath: '${{ github.workspace }}/server/Native/CMakeLists.txt' + configurePreset: ninja-multi-vcpkg + buildPreset: ninja-multi-vcpkg + buildPresetAdditionalArgs: '[`--config Release`]' + - name: List $RUNNER_WORKSPACE after build + run: find $RUNNER_WORKSPACE + shell: bash + diff --git a/.github/workflows/docker-server.yml b/.github/workflows/docker-server.yml deleted file mode 100644 index 0642614..0000000 --- a/.github/workflows/docker-server.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Docker Image of the Server -on: - push: - branches: [ "master", "feature/ci" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Copying the protocol files - run: cp -rv shared/protocol server/protocol - - uses: satackey/action-docker-layer-caching@v0.0.11 - continue-on-error: true - - name: Build the Docker image - working-directory: server - run: docker build . --file Dockerfile --tag cyberverse-server:$(date +%s)