Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5a80172
added compasUtils file
reinhold-willcox Mar 18, 2026
6047ff0
Updated COWD.cpp to properly log HeSDs
nrsegovia Apr 3, 2026
456a993
Merge pull request #1471 from TeamCOMPAS/HeSD_tests
ilyamandel Apr 3, 2026
dc3dc2c
Ship COMPAS C++ through PyPI with bundled runtime (pip install compas…
avivajpeyi Apr 9, 2026
758e7a4
docs: add notes on GH images
avivajpeyi Apr 16, 2026
69dcd13
Merge pull request #1475 from TeamCOMPAS/add_info_about_gh_images
ilyamandel Apr 18, 2026
364241f
Corrected the M&M NS remnant mass prescription to never return a remn…
Apr 19, 2026
273b3a3
Merge pull request #1477 from TeamCOMPAS/MM20mass
ilyamandel Apr 20, 2026
0aa9e76
CPP ?= g++ to CPP = g++
avivajpeyi Apr 22, 2026
44f585b
Merge pull request #1478 from TeamCOMPAS/fix_clang_bug
ilyamandel Apr 22, 2026
effdbcd
Fix pr commenter bug (#1479)
avivajpeyi Apr 23, 2026
3b9e632
Matlab cosmic integration updates
May 3, 2026
34efe33
Changed ASD to PSD
May 8, 2026
b978a06
Merge pull request #1480 from TeamCOMPAS/Matlab
jeffriley May 10, 2026
0aac620
Fix to non-random supernova kick angles
AldanaGrichener May 25, 2026
b5568f1
Update Options.h - fix typo
jeffriley May 26, 2026
defc1ae
Updated changelog.h
AldanaGrichener May 26, 2026
9358969
Merge pull request #1481 from AldanaGrichener/patch-1
jeffriley May 26, 2026
b401059
big cleanup of post processing utils
reinhold-willcox Jun 26, 2026
11caeb8
addressed nicolas' concerns
reinhold-willcox Jun 29, 2026
ec95efc
starting the process of adding unit testing
reinhold-willcox Jun 29, 2026
164791f
added compasUtils file
reinhold-willcox Mar 18, 2026
3d2135e
big cleanup of post processing utils
reinhold-willcox Jun 26, 2026
0f4452a
addressed nicolas' concerns
reinhold-willcox Jun 29, 2026
4625d96
starting the process of adding unit testing
reinhold-willcox Jun 29, 2026
5f5b0fa
minor textual fixes
reinhold-willcox Jun 30, 2026
dfcf1ef
Remove duplicate compas_h5sample entry point from setup.py.
reinhold-willcox Jul 6, 2026
cf75a75
Merge branch 'compas_post_processing_utils' of github.com:TeamCOMPAS/…
reinhold-willcox Jul 6, 2026
f5a6dd2
removed line from setup.py that was causing issues
reinhold-willcox Jul 6, 2026
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
97 changes: 97 additions & 0 deletions .github/workflows/comment-evolution-plot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Comment PR with Evolution Plot

on:
workflow_run:
workflows:
- COMPAS compile test
types:
- completed

permissions:
actions: read
contents: read
issues: write
pull-requests: write

jobs:
comment-with-plot:
name: Post evolution plot comment
runs-on: ubuntu-22.04
if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.pull_requests[0].number

env:
ARTIFACT_NAME: detailedEvolutionPlot.png

steps:
- name: Download evolution plot artifact from triggering run
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const path = require('path');
const runId = context.payload.workflow_run.id;
const runNumber = context.payload.workflow_run.run_number;
const artifactName = `evolution-plot-${runNumber}`;
const { owner, repo } = context.repo;

const artifacts = await github.paginate(
github.rest.actions.listWorkflowRunArtifacts,
{ owner, repo, run_id: runId, per_page: 100 }
);
const artifact = artifacts.find((entry) => entry.name === artifactName);

if (!artifact) {
core.setFailed(`Artifact '${artifactName}' not found for workflow run ${runId}`);
return;
}

const download = await github.rest.actions.downloadArtifact({
owner,
repo,
artifact_id: artifact.id,
archive_format: 'zip',
});

fs.writeFileSync(
path.join(process.env.GITHUB_WORKSPACE, 'evolution-plot.zip'),
Buffer.from(download.data)
);

- name: Unpack evolution plot artifact
run: |
set -e
mkdir -p evolution-plot
unzip -o evolution-plot.zip -d evolution-plot
test -f "evolution-plot/${ARTIFACT_NAME}"

- name: Post PR comment
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
RUN_ID: ${{ github.event.workflow_run.id }}
run: |
set -e

cat <<EOF > report.md
## ✅ COMPAS Build Successful!

| Item | Value |
|------|-------|
| **Commit** | [\`$(echo "$HEAD_SHA" | cut -c1-7)\`]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$HEAD_SHA) |
| **Logs** | [View workflow]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$RUN_ID) |

### Detailed Evolution Plot
<details><summary>Click to view evolution plot</summary>

![](./evolution-plot/${ARTIFACT_NAME})
</details>

---
<sub>Generated by COMPAS CI</sub>
EOF

npx -y @dvcorg/cml@0.20.6 comment create --target=pr/"$PR_NUMBER" report.md
53 changes: 4 additions & 49 deletions .github/workflows/compas-compile-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
compas:
env:
Expand All @@ -40,7 +43,7 @@ jobs:
echo "Building COMPAS from source..."
cd src
make clean 2>/dev/null || echo 'No existing build to clean'
make -j $(nproc) -f Makefile
make DOCKER_BUILD=1 CPP="g++" -j "$(nproc)" -f Makefile
./COMPAS -v
echo "COMPAS build completed successfully!"

Expand Down Expand Up @@ -106,51 +109,3 @@ jobs:
echo "- Python Dependencies: Success" >> $GITHUB_STEP_SUMMARY
echo "- Example COMPAS Job: Success" >> $GITHUB_STEP_SUMMARY
echo "- Pytest Suite: Success" >> $GITHUB_STEP_SUMMARY

comment-with-plot:
name: Comment PR with Evolution Plot
runs-on: ubuntu-22.04
container: docker://ghcr.io/iterative/cml:0-dvc2-base1
needs: compas
if: github.event_name == 'pull_request'

env:
ARTIFACT_NAME: detailedEvolutionPlot.png

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download evolution plot
uses: actions/download-artifact@v4
with:
name: evolution-plot-${{ github.run_number }}

- name: Create report with evolution plot
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "## ✅ COMPAS Build Successful!" >> report.md
echo "" >> report.md
echo "| Item | Value |" >> report.md
echo "|------|-------|" >> report.md
echo "| **Commit** | [\`$(echo $GITHUB_SHA | cut -c1-7)\`](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}) |" >> report.md
echo "| **Logs** | [View workflow](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}) |" >> report.md
echo "" >> report.md

if [ -f "${{ env.ARTIFACT_NAME }}" ]; then
echo "### Detailed Evolution Plot" >> report.md
echo "<details><summary>Click to view evolution plot</summary>" >> report.md
echo "" >> report.md
echo "![](./${{ env.ARTIFACT_NAME }})" >> report.md
echo "</details>" >> report.md
else
echo "### ⚠️ Evolution plot not found" >> report.md
fi

echo "" >> report.md
echo "---" >> report.md
echo "<sub>Generated by COMPAS CI </sub>" >> report.md

# Post the report using CML
cml comment create report.md
199 changes: 199 additions & 0 deletions .github/workflows/native-linux-bundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
name: Native Linux bundle

on:
workflow_dispatch:
pull_request:
branches:
- dev
paths:
- src/**
- misc/cicd-scripts/**
- .github/workflows/native-linux-bundle.yml
push:
branches:
- dev
paths:
- src/**
- misc/cicd-scripts/**
- .github/workflows/native-linux-bundle.yml

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
native-linux-bundle:
name: Build native Linux bundle
runs-on: ubuntu-22.04

env:
BUNDLE_DIR: dist/COMPAS-linux-x86_64
BUNDLE_TARBALL: dist/COMPAS-linux-x86_64.tar.gz
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_COMPILERCHECK: content

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Restore compiler cache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-native-linux-bundle-ccache-${{ hashFiles('src/Makefile', 'misc/cicd-scripts/linux-dependencies', '.github/workflows/native-linux-bundle.yml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-native-linux-bundle-ccache-${{ hashFiles('src/Makefile', 'misc/cicd-scripts/linux-dependencies', '.github/workflows/native-linux-bundle.yml') }}-

- name: Install native build dependencies
run: |
# Keep this workflow lean: install only the native compiler and link dependencies.
bash misc/cicd-scripts/linux-dependencies native-build

- name: Build COMPAS from source
working-directory: src
run: |
ccache --zero-stats || true
ccache --max-size=500M || true
make DOCKER_BUILD=1 CPP="ccache g++" -j "$(nproc)" -f Makefile
./COMPAS -v
ccache --show-stats || true

- name: Run native smoke test
working-directory: src
run: |
rm -rf smoke-output
./COMPAS \
-n 1 \
--initial-mass-1 35 \
--initial-mass-2 31 \
-a 3.5 \
--random-seed 0 \
--metallicity 0.001 \
--quiet \
-o smoke-output
test -d smoke-output
find smoke-output -maxdepth 2 -type f | sort | sed -n '1,40p'

- name: Inspect runtime dependencies
run: |
echo "Runtime dependencies for native build:"
ldd src/COMPAS

- name: Package portable Linux bundle
run: |
bash misc/cicd-scripts/package-linux-bundle.sh src/COMPAS "$BUNDLE_DIR"

- name: Test bundled launcher
run: |
"$BUNDLE_DIR/run_compas.sh" -v

BUNDLE_SMOKE_DIR="${RUNNER_TEMP}/compas-bundle-smoke"
rm -rf "$BUNDLE_SMOKE_DIR"

"$BUNDLE_DIR/run_compas.sh" \
-n 1 \
--initial-mass-1 35 \
--initial-mass-2 31 \
-a 3.5 \
--random-seed 0 \
--metallicity 0.001 \
--quiet \
-o "$BUNDLE_SMOKE_DIR"

test -d "$BUNDLE_SMOKE_DIR"

echo "Runtime dependencies for bundled binary with bundled lib/:"
LD_LIBRARY_PATH="${GITHUB_WORKSPACE}/$BUNDLE_DIR/lib" ldd "$BUNDLE_DIR/bin/COMPAS"

- name: Archive bundle tarball
run: |
tar -C dist -czf "$BUNDLE_TARBALL" COMPAS-linux-x86_64

- name: Upload bundle artifact
uses: actions/upload-artifact@v4
with:
name: COMPAS-linux-x86_64
path: ${{ env.BUNDLE_TARBALL }}
if-no-files-found: error

verify-native-linux-bundle:
name: Verify bundled artifact on fresh runner
runs-on: ubuntu-22.04
needs: native-linux-bundle

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Download bundle artifact
uses: actions/download-artifact@v4
with:
name: COMPAS-linux-x86_64
path: downloaded-artifact

- name: Install Python runner only
run: |
python -m pip install --no-deps -e .

- name: Unpack bundled artifact
run: |
mkdir -p bundle-test
tar -xzf downloaded-artifact/COMPAS-linux-x86_64.tar.gz -C bundle-test
test -x bundle-test/COMPAS-linux-x86_64/run_compas.sh

- name: Inspect downloaded bundle dependencies
run: |
LD_LIBRARY_PATH="${GITHUB_WORKSPACE}/bundle-test/COMPAS-linux-x86_64/lib" \
ldd bundle-test/COMPAS-linux-x86_64/bin/COMPAS | tee bundle-test/ldd.txt

! grep -q 'not found' bundle-test/ldd.txt
grep -q 'bundle-test/COMPAS-linux-x86_64/lib/libhdf5_serial' bundle-test/ldd.txt
grep -q 'bundle-test/COMPAS-linux-x86_64/lib/libgsl' bundle-test/ldd.txt
grep -q 'bundle-test/COMPAS-linux-x86_64/lib/libboost_program_options' bundle-test/ldd.txt

- name: Run downloaded bundle smoke test
run: |
./bundle-test/COMPAS-linux-x86_64/run_compas.sh -v

ARTIFACT_SMOKE_DIR="${RUNNER_TEMP}/compas-downloaded-bundle-smoke"
rm -rf "$ARTIFACT_SMOKE_DIR"

./bundle-test/COMPAS-linux-x86_64/run_compas.sh \
-n 1 \
--initial-mass-1 35 \
--initial-mass-2 31 \
-a 3.5 \
--random-seed 0 \
--metallicity 0.001 \
--quiet \
-o "$ARTIFACT_SMOKE_DIR"

test -d "$ARTIFACT_SMOKE_DIR"

- name: Run Python runner against downloaded bundle
env:
COMPAS_BUNDLE_ROOT: ${{ github.workspace }}/bundle-test/COMPAS-linux-x86_64
run: |
compas_run --print-path
compas_run -v

PYTHON_RUNNER_SMOKE_DIR="${RUNNER_TEMP}/compas-python-runner-smoke"
rm -rf "$PYTHON_RUNNER_SMOKE_DIR"

compas_run \
-n 1 \
--initial-mass-1 35 \
--initial-mass-2 31 \
-a 3.5 \
--random-seed 0 \
--metallicity 0.001 \
--quiet \
-o "$PYTHON_RUNNER_SMOKE_DIR"

test -d "$PYTHON_RUNNER_SMOKE_DIR"
Loading
Loading