Skip to content

ci: try another one #35

ci: try another one

ci: try another one #35

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
compiler: g++
build-args: -static
- os: windows-latest
extension: .exe
compiler: /mingw64/bin/g++
build-args: -static
- os: macos-latest
compiler: g++
# MacOS cannot build fully static
# reference: https://stackoverflow.com/questions/5259249/creating-static-mac-os-x-c-build
build-args:
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
- name: Build Project
if: ${{ matrix.os == 'windows-latest' }}
shell: bash
run: ls /mingw64/bin/
# Build step - uses appropriate compiler and args based on OS
- name: Build Project
shell: bash
run: |
mkdir output/
${{ matrix.compiler }} ${{ matrix.build-args }} -std=c++2a -I./src ./XanaduCLI/XanaduCLI.cpp ./src/XanaduXVD.cpp ./src/XVDTypes.cpp -o output/XanaduCLI${{ matrix.extension }}
- uses: actions/upload-artifact@v4
with:
name: Executable (${{ matrix.os }})
path: output/XanaduCLI${{ matrix.extension }}