Skip to content

fixed workflow

fixed workflow #8

Workflow file for this run

name: C++ CI Build with Enhanced Windows Support
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
include:
- os: ubuntu-latest
name: "Linux x64"
asset_name: "MCRandomProxy-Linux"
cc: "gcc"
cxx: "g++"
- os: windows-latest
name: "Windows MSVC"
asset_name: "MCRandomProxy-Windows.exe"
cc: "cl"
cxx: "cl"
build_env_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up environment (Windows)
if: matrix.os == 'windows-latest'
run: |
cmd "${{ matrix.build_env_script }}"
- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y g++ cmake make
- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
choco install ninja cmake --version=3.21.3
choco install visualstudio2019buildtools --includeOptional
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja"
- name: Build
run: cmake --build build --config Release
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.asset_name }}
path: ./build/${{ matrix.asset_name }}