Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Github Actions #59

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: infoware CI
on:
push:
pull_request:

jobs:
linux:
name: Ubuntu 18.04 amd64 (${{matrix.cpp-version}})
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
cpp-version: [g++, clang++]

steps:
- name: Checkout infoware
uses: actions/checkout@v2
with:
path: infoware

- name: Install apt packages
run: sudo apt update && sudo apt install -y cmake ninja-build ocl-icd-opencl-dev

- name: Generate CMake
run: mkdir infoware/build && cd infoware/build && cmake -DCMAKE_BUILD_TYPE=Release -DINFOWARE_USE_OPENCL=ON -DINFOWARE_EXAMPLES=ON -DINFOWARE_TESTS=ON -G Ninja ..
env:
CXX: ${{matrix.cpp-version}}

- name: Build Project
run: cmake --build infoware/build

- name: Run Tests
run: ctest --test-dir infoware/build

macos:
name: macOS amd64 ${{matrix.cfg.name}}
runs-on: ${{matrix.cfg.os}}
strategy:
fail-fast: false
matrix:
cfg:
- { os: macos-10.15, name: "Catalina", dist: true}
- { os: macos-11, name: "Big Sur", dist: false}

steps:
- name: Checkout infoware
uses: actions/checkout@v2
with:
path: infoware

- name: Install homebrew packages
run: brew install cmake ninja openssl

- name: Generate CMake
run: mkdir infoware/build && cd infoware/build && cmake -DCMAKE_BUILD_TYPE=Release -DINFOWARE_USE_OPENCL=ON -DINFOWARE_EXAMPLES=ON -DINFOWARE_TESTS=ON -G Ninja ..

- name: Build Project
run: cmake --build infoware/build

- name: Run Tests
run: ctest --test-dir infoware/build

windows: # Windows amd64 and i386 build matrix
strategy:
fail-fast: false # Don't cancel other matrix jobs if one fails
matrix:
cfg:
- { name: i386, arch: x86, chocoargs: "--x86"}
- { name: amd64, arch: x64, chocoargs: ""}

name: "Windows MSVC ${{matrix.cfg.name}}"
runs-on: windows-2019
steps:
- name: Checkout infoware
uses: actions/checkout@v2
with:
path: infoware

- name: Configure MSBuild
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.cfg.arch }}

- name: Install chocolatey packages (${{ matrix.cfg.name }})
run: choco install ninja -y ${{ matrix.cfg.chocargs }}

- name: Generate CMake
run: mkdir infoware/build && cd infoware/build && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DINFOWARE_EXAMPLES=ON -DINFOWARE_TESTS=ON ..

- name: Build Project
run: cmake --build infoware/build

- name: Run Tests
run: ctest --test-dir infoware/build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
!include/**
!tools
!tools/**
!.git*
!.gitignore
!.github/**
!.clang-format
!.travis.yml
!appveyor.yml
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# infoware [![License](https://img.shields.io/badge/license-CC0-green.svg?style=flat)](LICENSE) [![TravisCI build status](https://travis-ci.org/ThePhD/infoware.svg?branch=master)](https://travis-ci.org/ThePhD/infoware) [![AppVeyorCI build status](https://ci.appveyor.com/api/projects/status/github/ThePhD/infoware?branch=master&svg=true)](https://ci.appveyor.com/project/ThePhD/infoware/branch/master)
# infoware [![License](//img.shields.io/badge/license-CC0-green.svg?style=flat)](LICENSE) [![CI status](//github.com/ThePhD/infoware/actions/workflows/ci.yml/badge.svg)](//github.com/ThePhD/infoware/actions/workflows/ci.yml)

C++ Library for pulling system and hardware information, without hitting the command line.


Expand Down