Skip to content

with gcc-13

with gcc-13 #61

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }} # on all machines specified
strategy:
fail-fast: false
matrix:
config:
- {
name: "macOS Latest Clang",
os: macos-latest,
build_type: "Release",
cc: "clang",
cxx: "clang++",
generators: "Ninja"
}
- {
name: "Ubuntu_latest_gcc-13",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc",
cxx: "g++",
generators: "Ninja"
}
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Install dependencies on macOS
if: startsWith(matrix.config.os, 'macos')
run: |
brew install ninja
brew install boost
mkdir -p ${{github.workspace}}/build
mkdir -p ${{github.workspace}}/build/tests
cp -r ${{github.workspace}}/tests/data ${{github.workspace}}/build/tests
- name: Install dependencies on Ubuntu_latest_gcc-13
if: startsWith(matrix.config.name, 'Ubuntu_latest_gcc-13')
run: |
mkdir -p ${{github.workspace}}/build
mkdir -p ${{github.workspace}}/build/tests
cp -r ${{github.workspace}}/tests/data ${{github.workspace}}/build/tests
echo =============== Update gcc ======================================
echo gcc version before:
gcc --version
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install ninja-build gcc-13 g++-13
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 90 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13
echo gcc version after
gcc --version
echo =============== Get BOOST =======================================
sudo apt-get update
sudo apt-get install libboost-all-dev
echo =============== Update ninja ====================================
echo ninja version before
ninja --version
wget https://github.com/ninja-build/ninja/releases/latest/download/ninja-linux.zip
sudo unzip ninja-linux.zip -d /usr/local/bin/
sudo update-alternatives --install /usr/bin/ninja ninja /usr/local/bin/ninja 1 --force
echo ninja version after
ninja --version
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ${{github.workspace}}/tests/unittests
- uses: actions/upload-artifact@v2
with:
name: mitosim-${{ matrix.config.os }}
path: ${{github.workspace}}/app/mitosim