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 8 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
104 changes: 104 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: infoware CI
on:
push:
pull_request:

jobs:
linux-x64:
jameskr97 marked this conversation as resolved.
Show resolved Hide resolved
name: Linux x64 (${{matrix.cfg.cpp-version}})
jameskr97 marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ${{matrix.cfg.os}}
strategy:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-18.04, cpp-version: g++-8 }
- { os: ubuntu-18.04, cpp-version: g++-9 }
- { os: ubuntu-18.04, cpp-version: clang++-7 }
- { os: ubuntu-18.04, cpp-version: clang++-8 }
- { os: ubuntu-18.04, cpp-version: clang++-9 }
jameskr97 marked this conversation as resolved.
Show resolved Hide resolved

steps:
- name: Checkout infoware
uses: actions/checkout@v2
with:
path: main
jameskr97 marked this conversation as resolved.
Show resolved Hide resolved

- name: Install apt packages
run: sudo apt update && sudo apt install -y cmake ${{ matrix.cfg.cpp-version }} ninja-build ocl-icd-opencl-dev

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

- name: Build Project
run: cd main/build && ninja
jameskr97 marked this conversation as resolved.
Show resolved Hide resolved

- name: Run Tests
run: cd main/build && ctest

macos:
name: macOS x64 ${{matrix.cfg.name}}
jameskr97 marked this conversation as resolved.
Show resolved Hide resolved
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: main

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

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

- name: Build Project
run: cd main/build && ninja

- name: Run Tests
run: cd main/build && ctest

windows: # Windows x64 and x86 build matrix
jameskr97 marked this conversation as resolved.
Show resolved Hide resolved
strategy:
fail-fast: false # Don't cancel other matrix jobs if one fails
matrix:
cfg:
- { name: 32 Bit, arch: x86 }
- { name: 64 Bit, arch: x64 }
jameskr97 marked this conversation as resolved.
Show resolved Hide resolved

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

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

- name: Install chocolatey packages (x86)
if: ${{ matrix.cfg.arch == 'x86' }}
run: choco install ninja -y --x86

- name: Install chocolatey packages (x64)
if: ${{ matrix.cfg.arch == 'x64' }}
run: choco install ninja -y
jameskr97 marked this conversation as resolved.
Show resolved Hide resolved

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

- name: Build Project
run: cmake --build main/build
jameskr97 marked this conversation as resolved.
Show resolved Hide resolved

- name: Run Tests
run: cd main/build && ctest
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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# 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)
<p>
<h1>infoware</h1>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-CC0-green.svg?style=flat"/></a>
<a href="https://github.com/ThePhD/infoware/actions/workflows/ci.yml"><img src="https://github.com/ThePhD/infoware/actions/workflows/ci.yml/badge.svg"/></a>
</p>
jameskr97 marked this conversation as resolved.
Show resolved Hide resolved


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


Expand Down