Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

fix: cpp tests

fix: cpp tests #759

Workflow file for this run

name: C++ CI in windows & linux
on:
push:
branches:
- '*'
paths:
- "cpp/**"
pull_request:
branches:
- '*'
paths:
- "cpp/**"
workflow_dispatch:
jobs:
single:
name: "build MiraiCP-single (${{ matrix.os }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-2019
- ubuntu-20.04
env:
isWindows: ${{ startsWith(matrix.os, 'windows') }}
isUbuntu: ${{ startsWith(matrix.os, 'ubuntu') }}
steps:
- name: checkout
uses: actions/checkout@v4
- id: generate-skip-envs-bash
run: python scripts/CIHelper.py skip_env "${{ github.event.head_commit.message }}"
# Linux
- name: setup gcc
if: ${{ env.isUbuntu == 'true' && env.SKIP_LINUX != 'true' }}
uses: egor-tensin/setup-gcc@v1
with:
version: 9
platform: x64
- name: build with gcc ubuntu
if: ${{ env.isUbuntu == 'true' && env.SKIP_LINUX != 'true' }}
env:
cc: gcc
cxx: g++
run: ./scripts/LINUX/cppBuilds.sh single
# Windows
- name: setup MSVC
if: ${{ env.isWindows == 'true' && env.SKIP_WINDOWS != 'true' }}
uses: ilammy/[email protected]
with:
arch: amd64
vsversion: 2019
- name: build with MSVC
if: ${{ env.isWindows == 'true' && env.SKIP_WINDOWS != 'true' }}
run: ./scripts/WIN/cppBuilds.bat single
libLoader:
name: "build MiraiCP-libLoader (${{ matrix.os }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-2019
- ubuntu-20.04
env:
isWindows: ${{ startsWith(matrix.os, 'windows') }}
isUbuntu: ${{ startsWith(matrix.os, 'ubuntu') }}
steps:
- name: checkout
uses: actions/checkout@v4
- id: generate-skip-envs
run: python scripts/CIHelper.py skip_env "${{ github.event.head_commit.message }}" >> $GITHUB_ENV
# Linux
- name: setup gcc
if: ${{ env.isUbuntu == 'true' && env.SKIP_LINUX != 'true' }}
uses: egor-tensin/setup-gcc@v1
with:
version: 9
platform: x64
- name: build with gcc ubuntu
if: ${{ env.isUbuntu == 'true' && env.SKIP_LINUX != 'true' }}
env:
cc: gcc
cxx: g++
run: ./scripts/LINUX/cppBuilds.sh libLoader
# Windows
- name: setup MSVC
if: ${{ env.isWindows == 'true' && env.SKIP_WINDOWS != 'true' }}
uses: ilammy/[email protected]
with:
arch: amd64
vsversion: 2019
- name: build with MSVC
if: ${{ env.isWindows == 'true' && env.SKIP_WINDOWS != 'true' }}
run: ./scripts/WIN/cppBuilds.bat libLoader