Skip to content

CI

CI #169

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 1 * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
#
# win64 msvc
#
build-windows-msvc:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Download MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Build
run: |
echo "Building for C."
.\scripts\build_msvc.bat --output automation_c.exe --config debug --source tests\automation_c\automation_c.c
echo `n
echo "Building for C++."
.\scripts\build_msvc.bat --output automation_cpp.exe --config debug --source tests\automation_cpp\automation_cpp.cpp
echo `n
- name: Run
run: |
echo "Running C."
.\bin\win64\msvc\debug\tests\automation_c.exe
echo `n
echo "Running C++."
.\bin\win64\msvc\debug\tests\automation_cpp.exe
echo `n
#
# win64 clang/gcc
#
build-windows-clang-gcc:
runs-on: windows-latest
strategy:
matrix:
compiler: [clang, clang++, gcc, g++]
include:
- compiler: clang
language: "c"
- compiler: gcc
language: "c"
- compiler: clang++
language: "cpp"
- compiler: g++
language: "cpp"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "13.0"
directory: ${{ runner.temp }}/llvm
- name: Build
env:
LANGUAGE: ${{ matrix.language }}
run: .\scripts\build_clang_gcc.bat --output automation.exe --compiler ${{ matrix.compiler }} --config debug --source tests\automation_%LANGUAGE%\automation_%LANGUAGE%.%LANGUAGE%
- name: Run
run: .\bin\win64\${{ matrix.compiler }}\debug\tests\automation.exe
#
# linux
#
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [clang, clang++, gcc, g++]
include:
- compiler: clang
language: "c"
- compiler: gcc
language: "c"
- compiler: clang++
language: "cpp"
- compiler: g++
language: "cpp"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "15.0"
directory: ${{ runner.temp }}/llvm
- name: Build
env:
LANGUAGE: ${{ matrix.language }}
run: ./scripts/build_clang_gcc.sh --output automation.exe --compiler ${{ matrix.compiler }} --config debug --source tests/automation_$LANGUAGE/automation_$LANGUAGE.$LANGUAGE
- name: Run
run: ./bin/linux/${{ matrix.compiler }}/debug/tests/automation.exe
#
# mac os
#
build-macos:
runs-on: macos-latest
strategy:
matrix:
compiler: [clang, clang++, gcc, g++]
include:
- compiler: clang
language: "c"
- compiler: gcc
language: "c"
- compiler: clang++
language: "cpp"
- compiler: g++
language: "cpp"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Build
env:
LANGUAGE: ${{ matrix.language }}
run: ./scripts/build_clang_gcc.sh --output automation.exe --compiler ${{ matrix.compiler }} --config debug --source tests/automation_$LANGUAGE/automation_$LANGUAGE.$LANGUAGE
- name: Run
run: ./bin/macos/${{ matrix.compiler }}/debug/tests/automation.exe