From 7c8f329c9581ee5531d330015eecd5b5842c5a60 Mon Sep 17 00:00:00 2001 From: EoD <293499+EoD@users.noreply.github.com> Date: Sat, 20 Aug 2022 02:08:14 +0000 Subject: [PATCH] Add Github Actions Workflow --- .github/workflows/cmake.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..9aa2904 --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,46 @@ +name: CMake Build + +on: + push: + branches: + - "master" + pull_request: + branches: + - "master" + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + build_type: ["Release", "Debug"] + runs-on: windows-2022 + + steps: + - uses: actions/checkout@v3 + with: + submodules: "true" + + - name: Clone vcpkg + uses: actions/checkout@v3 + with: + repository: "microsoft/vcpkg" + path: ${{github.workspace}}/vcpkg + + - name: Bootstrap vcpkg + run: ${{github.workspace}}/vcpkg/bootstrap-vcpkg.bat + + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build --preset vs2022-windows + env: + VCPKG_ROOT: ${{github.workspace}}/vcpkg + Skyrim64Path: ${{github.workspace}}/ # unused dummy variable + + - name: Build CMake + run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} + + - name: Create Artifact + uses: actions/upload-artifact@v3 + with: + name: ${{matrix.build_type}}_Build + path: ${{github.workspace}}/build/src/${{matrix.build_type}}/