Skip to content

Add CI build using GitHub Actions for MSVC (cl.exe) compiler #1

Add CI build using GitHub Actions for MSVC (cl.exe) compiler

Add CI build using GitHub Actions for MSVC (cl.exe) compiler #1

Workflow file for this run

name: Build project using CMake on Windows using cl.exe (MSVC)
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-2019
strategy:
matrix:
build_type: [Release]
c_compiler: [cl]
cpp_compiler: [cl]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Build Project
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: elf2vkp
path: "${{ steps.strings.outputs.build-output-dir }}/Release/elf2vkp.exe"
retention-days: 1