Skip to content

ci: try another one #27

ci: try another one

ci: try another one #27

name: C/C++ CI and Release
on:
push:
workflow_dispatch: # Allow manual runs if needed
jobs:
build-and-release:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.os == 'macos-latest' }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
extension: .out
compiler: g++
- os: windows-latest
extension: .exe
compiler: mingw-g++
- os: macos-latest
extension: .out
compiler: clang++
steps:
- uses: actions/checkout@v4
# Set up MSYS2 environment and install MinGW on Windows
- name: Set up MSYS2 with MinGW
id: msys2
if: ${{ matrix.os == 'windows-latest' }}
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: mingw-w64-x86_64-gcc
# Add MinGW to PATH on Windows
- name: Add MinGW to PATH
if: ${{ matrix.os == 'windows-latest' }}
run: |
echo "${{ steps.msys2.outputs.msys2-location }}/mingw64/bin"
echo "${{ steps.msys2.outputs.msys2-location }}/mingw64/bin" >> $GITHUB_PATH
shell: bash
# Build step - uses appropriate compiler based on OS
- name: Build Project (Windows)
shell: bash
if: ${{ matrix.compiler == 'mingw-g++' }}
run: ${{ steps.msys2.outputs.msys2-location }}/mingw64/bin/g++ -static -std=c++2a -I./src ./XanaduCLI/XanaduCLI.cpp ./src/XanaduXVD.cpp ./src/XVDTypes.cpp -o XanaduCLI${{ matrix.extension }}
- name: Build Project (Windows)
shell: bash
if: ${{ matrix.compiler != 'mingw-g++' }}
run: ${{ matrix.compiler }} -static -std=c++2a -I./src ./XanaduCLI/XanaduCLI.cpp ./src/XanaduXVD.cpp ./src/XVDTypes.cpp -o XanaduCLI${{ matrix.extension }}