Skip to content

Use <random> instead of srand and rand, add GameOfLife class #184

Use <random> instead of srand and rand, add GameOfLife class

Use <random> instead of srand and rand, add GameOfLife class #184

Workflow file for this run

name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
paths-ignore:
- 'README.md'
- 'LICENSE'
pull_request:
branches: [ master ]
paths-ignore:
- 'README.md'
- 'LICENSE'
jobs:
build-Ubuntu:
name: "Build Appimage on Ubuntu"
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- run: sudo apt update
- name: Install meson
run: sudo apt install meson
- name: Install dependencies
run: sudo apt install libsfml-dev libboost-program-options-dev
- name: Configure the project with meson
run: meson build -Dprefix=$(pwd)/AppDir/usr
- name: Compile and install to AppDir
run: ninja -vC build install
- name: Download linuxdeploy
run: wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage
- name: Add linuxdeploy dependency
run: sudo add-apt-repository universe; sudo apt install libfuse2
- name: Create AppDir
run: ./linuxdeploy-x86_64.AppImage --appdir AppDir
- name: Create AppImage
run: ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage
- name: Save AppImage
uses: actions/upload-artifact@v2
with:
name: AppImage
path: Game_of_life*
build-Windows:
name: "Build on Windows"
runs-on: windows-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install SFML
run: |
$url = "https://www.sfml-dev.org/files/SFML-2.5.1-windows-gcc-7.3.0-mingw-64-bit.zip"
$archive = "sfml.zip"
$dir = "."
Invoke-WebRequest -Uri $url -OutFile $archive
Expand-Archive -LiteralPath $archive -DestinationPath $dir
- name: Cache Boost
uses: actions/cache@v2
with:
path: '${{ runner.workspace }}/boost_*.tar.gz'
key: 'boost-1.78.0'
- name: Build Boost
id: boost
uses: egor-tensin/build-boost@v1
with:
version: 1.78.0
libraries: program_options
platform: x64
configuration: Release
toolset: gcc
static: 1
- name: Configure the project with cmake
run: |
cmake . -G "MinGW Makefiles" -D "BOOST_ROOT=${{ steps.boost.outputs.root }}" -D "BOOST_LIBRARYDIR=${{ steps.boost.outputs.librarydir }}" -D "BOOST_INCLUDEDIR=${{ steps.boost.outputs.root }}"
- name: Compile
run: mingw32-make
- name: Save executable
uses: actions/upload-artifact@v2
with:
name: Windows executable
path: game_of_life.exe