Skip to content

Commit 74a138c

Browse files
Copilotkozo2
andauthored
Add GitHub Actions CI workflow (#12)
* Initial plan * Add GitHub Actions CI workflow Co-authored-by: kozo2 <12192+kozo2@users.noreply.github.com> * Add permissions block to workflow for security Co-authored-by: kozo2 <12192+kozo2@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kozo2 <12192+kozo2@users.noreply.github.com>
1 parent a5fea1b commit 74a138c

3 files changed

Lines changed: 68 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build-and-test:
11+
name: ${{ matrix.os }} - ${{ matrix.compiler }}
12+
runs-on: ${{ matrix.os }}
13+
14+
permissions:
15+
contents: read
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- os: ubuntu-latest
22+
compiler: gcc
23+
cxx: g++
24+
- os: ubuntu-latest
25+
compiler: clang
26+
cxx: clang++
27+
- os: macos-latest
28+
compiler: clang
29+
cxx: clang++
30+
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v4
34+
35+
- name: Install dependencies (Ubuntu)
36+
if: runner.os == 'Linux'
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y cmake libboost-dev libgsl-dev
40+
41+
- name: Install dependencies (macOS)
42+
if: runner.os == 'macOS'
43+
run: |
44+
brew install cmake gsl boost
45+
46+
- name: Configure
47+
env:
48+
CC: ${{ matrix.compiler }}
49+
CXX: ${{ matrix.cxx }}
50+
run: cmake .
51+
52+
- name: Build
53+
run: make -j$(nproc 2>/dev/null || sysctl -n hw.ncpu)
54+
55+
- name: Test
56+
run: ctest --output-on-failure

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,14 @@ bin/*
44
.DS_Store
55
*~
66
*.swp
7+
# Generated CMake files and build artifacts
8+
CMakeCache.txt
9+
CMakeFiles/
10+
cmake_install.cmake
11+
Makefile
12+
CTestTestfile.cmake
13+
*.a
14+
greens_functions/
15+
tablegen/make_cjy_table
16+
tablegen/make_sjy_table
17+
tests/GreensFunction*_test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# greens functions
22

3-
[![Build Status](https://travis-ci.org/ecell/greens_functions.svg?branch=master)](https://travis-ci.org/ecell/greens_functions)
3+
[![CI](https://github.com/ecell/greens_functions/workflows/CI/badge.svg)](https://github.com/ecell/greens_functions/actions)
44

55
for eGFRD simulation.

0 commit comments

Comments
 (0)