From 499d027f39aad80b63fa97fb8daa09044fd32941 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Nov 2025 08:32:37 +0000 Subject: [PATCH 1/3] Initial plan From cf038a836f57949ed8ec6bf1d32f05c5335fae44 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Nov 2025 08:41:35 +0000 Subject: [PATCH 2/3] Add GitHub Actions CI workflow Co-authored-by: kozo2 <12192+kozo2@users.noreply.github.com> --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ .gitignore | 11 +++++++++ README.md | 2 +- 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6f825d9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-and-test: + name: ${{ matrix.os }} - ${{ matrix.compiler }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + compiler: gcc + cxx: g++ + - os: ubuntu-latest + compiler: clang + cxx: clang++ + - os: macos-latest + compiler: clang + cxx: clang++ + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies (Ubuntu) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y cmake libboost-dev libgsl-dev + + - name: Install dependencies (macOS) + if: runner.os == 'macOS' + run: | + brew install cmake gsl boost + + - name: Configure + env: + CC: ${{ matrix.compiler }} + CXX: ${{ matrix.cxx }} + run: cmake . + + - name: Build + run: make -j$(nproc 2>/dev/null || sysctl -n hw.ncpu) + + - name: Test + run: ctest --output-on-failure diff --git a/.gitignore b/.gitignore index 8d336d7..f47bc55 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,14 @@ bin/* .DS_Store *~ *.swp +# Generated CMake files and build artifacts +CMakeCache.txt +CMakeFiles/ +cmake_install.cmake +Makefile +CTestTestfile.cmake +*.a +greens_functions/ +tablegen/make_cjy_table +tablegen/make_sjy_table +tests/GreensFunction*_test diff --git a/README.md b/README.md index 9bca1a2..1e30a24 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # greens functions -[![Build Status](https://travis-ci.org/ecell/greens_functions.svg?branch=master)](https://travis-ci.org/ecell/greens_functions) +[![CI](https://github.com/ecell/greens_functions/workflows/CI/badge.svg)](https://github.com/ecell/greens_functions/actions) for eGFRD simulation. From 84703e7b9452b990f87b8c90e2058878c6e37153 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Nov 2025 08:43:34 +0000 Subject: [PATCH 3/3] Add permissions block to workflow for security Co-authored-by: kozo2 <12192+kozo2@users.noreply.github.com> --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f825d9..fa68ac4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,9 @@ jobs: name: ${{ matrix.os }} - ${{ matrix.compiler }} runs-on: ${{ matrix.os }} + permissions: + contents: read + strategy: fail-fast: false matrix: