Skip to content

Commit

Permalink
Update changelog.h
Browse files Browse the repository at this point in the history
  • Loading branch information
brcekadam committed Jan 15, 2025
2 parents f44666c + e512bd8 commit 58912d1
Show file tree
Hide file tree
Showing 18 changed files with 480 additions and 521 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/compas-compile-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ name: COMPAS compile test
push:
branches:
- dev
-
# Ensures only the latest workflow run for the same branch is active, canceling any in-progress runs.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
compas:
env:
Expand All @@ -25,17 +31,18 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: pip
cache-dependency-path: setup.py
- name: Install TeXLive
uses: teatimeguest/setup-texlive-action@v3
- name: Install dependencies on ubuntu
if: 'startsWith(matrix.os, ''ubuntu-20'')'
if: 'startsWith(matrix.os, ''ubuntu-2'')'
run: |
cd misc/cicd-scripts
chmod 755 linux-dependencies
Expand Down Expand Up @@ -66,16 +73,23 @@ jobs:
coverage html
coverage-badge -o coverage_badge.svg -f
- name: Archive code coverage results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: |
htmlcov/
coverage_badge.svg
- name: Archive COMPAS detailed-evolution plot
id: upload
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: '${{ env.ARTIFACT_NAME }}'
path: '${{ env.ARTIFACT_PATH }}/${{ env.ARTIFACT_NAME }}'
if-no-files-found: error
- name: Test Summary
run: |
echo "### Test Results" >> $GITHUB_STEP_SUMMARY
echo "- Compas Build: Success" >> $GITHUB_STEP_SUMMARY
echo "- Python Utils Installation: Success" >> $GITHUB_STEP_SUMMARY
echo "- Example COMPAS Job: Success" >> $GITHUB_STEP_SUMMARY
echo "- Pytest Execution: Success" >> $GITHUB_STEP_SUMMARY
43 changes: 29 additions & 14 deletions .github/workflows/dockerhub-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,41 @@ on:
branches: [ dev ]
workflow_dispatch: null

# Ensures only the latest workflow run for the same branch is active, canceling any in-progress runs.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release:
name: Build Docker image and push to DockerHub
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Log in to Dockerhub
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}

uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Get release version
run: echo "COMPAS_VERSION=$(sed -n '/const std::string VERSION_STRING/,/^$/p' ./src/changelog.h | sed 's/.*"\(.*\)"[^"]*$/\1/')" >> $GITHUB_ENV

- name: Print version
run: echo $COMPAS_VERSION

- name: Build and tag Docker image
run: docker build -t teamcompas/compas:$COMPAS_VERSION -t teamcompas/compas:latest .

- name: Push Docker image
run: |
docker push teamcompas/compas:$COMPAS_VERSION
docker push teamcompas/compas:latest

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
teamcompas/compas:${{ env.COMPAS_VERSION }}
teamcompas/compas:latest
cache-from: type=gha
cache-to: type=gha,mode=max

71 changes: 0 additions & 71 deletions .github/workflows/latex-compile-ci.yml

This file was deleted.

85 changes: 42 additions & 43 deletions .github/workflows/pr_artifact_url_commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,67 @@ on:
jobs:
comment:
runs-on: ubuntu-latest
continue-on-error: true
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Get Artifact and Pull request info
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_RUN_EVENT_OBJ: ${{ toJSON(github.event.workflow_run) }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
run: |
PREVIOUS_JOB_ID=$(jq -r '.id' <<< "$WORKFLOW_RUN_EVENT_OBJ")
echo "Previous Job ID: $PREVIOUS_JOB_ID"
echo "PREVIOUS_JOB_ID=$PREVIOUS_JOB_ID" >> "$GITHUB_ENV"
SUITE_ID=$(jq -r '.check_suite_id' <<< "$WORKFLOW_RUN_EVENT_OBJ")
echo "Previous Suite ID: $SUITE_ID"
echo "SUITE_ID=$SUITE_ID" >> "$GITHUB_ENV"
ARTIFACT_ID=$(gh api "/repos/$OWNER/$REPO/actions/artifacts" \
--jq ".artifacts.[] |
select(.workflow_run.id==${PREVIOUS_JOB_ID}) |
select(.expired==false) |
.id")
echo "Artifact ID: $ARTIFACT_ID"
--jq ".artifacts[] | select(.workflow_run.id==$PREVIOUS_JOB_ID and .expired==false and .name=='detailedEvolutionPlot.png') | .id" | head -n1)
echo "ARTIFACT_ID=$ARTIFACT_ID" >> "$GITHUB_ENV"
PR_NUMBER=$(jq -r '.pull_requests[0].number' \
<<< "$WORKFLOW_RUN_EVENT_OBJ")
echo "Pull request Number: $PR_NUMBER"
echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_ENV"
PR_NUMBER=$(gh api "/repos/$OWNER/$REPO/commits/${{ github.event.workflow_run.head_sha }}/pulls" --jq '.[0].number')
echo "PR_NUMBER=${PR_NUMBER:-null}" >> "$GITHUB_ENV"
HEAD_SHA=$(jq -r '.pull_requests[0].head.sha' \
<<< "$WORKFLOW_RUN_EVENT_OBJ")
echo "Head SHA: $HEAD_SHA"
HEAD_SHA=${{ github.event.workflow_run.head_sha }}
echo "HEAD_SHA=$HEAD_SHA" >> "$GITHUB_ENV"
- name: Find Comment
uses: peter-evans/find-comment@v2
id: find-comment
with:
issue-number: ${{ env.PR_NUMBER }}
comment-author: 'github-actions[bot]'
- name: Download artifact
if: env.PR_NUMBER != 'null' && env.ARTIFACT_ID != ''
run: |
gh api /repos/${{ github.repository }}/actions/artifacts/${{ env.ARTIFACT_ID }}/zip -H "Accept: application/vnd.github.v3+json" --output artifact.zip
unzip artifact.zip
rm artifact.zip
- name: Update Comment
if: env.PR_NUMBER != 'null' && env.ARTIFACT_ID != ''
env:
JOB_PATH: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ env.PREVIOUS_JOB_ID }}"
ARTIFACT_URL: "${{ github.server_url }}/${{ github.repository }}/suites/$SUITE_ID/artifacts/$ARTIFACT_ID"
HEAD_SHA: "${{ env.HEAD_SHA }}"
uses: peter-evans/create-or-update-comment@v3
ARTIFACT_URL: "${{ github.server_url }}/${{ github.repository }}/suites/${{ env.SUITE_ID }}/artifacts/${{ env.ARTIFACT_ID }}"
uses: actions/github-script@v6
with:
issue-number: ${{ env.PR_NUMBER }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
edit-mode: replace
body: |-
![badge]
Build Successful! You can find a link to the downloadable artifact below.
| Name | Link |
| -------- | ----------------------- |
| Commit | ${{ env.HEAD_SHA }} |
| Logs | ${{ env.JOB_PATH }} |
| Download | ${{ env.ARTIFACT_URL }} |
[badge]: https://img.shields.io/badge/Build_Success!-0d1117?style=for-the-badge&labelColor=3fb950&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBkPSJNMjEuMDMgNS43MmEuNzUuNzUgMCAwIDEgMCAxLjA2bC0xMS41IDExLjVhLjc0Ny43NDcgMCAwIDEtMS4wNzItLjAxMmwtNS41LTUuNzVhLjc1Ljc1IDAgMSAxIDEuMDg0LTEuMDM2bDQuOTcgNS4xOTVMMTkuOTcgNS43MmEuNzUuNzUgMCAwIDEgMS4wNiAwWiI+PC9wYXRoPjwvc3ZnPg==
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const fs = require('fs');
const imageData = fs.readFileSync('detailedEvolutionPlot.png', {encoding: 'base64'});
github.rest.issues.createComment({
issue_number: process.env.PR_NUMBER,
owner: context.repo.owner,
repo: context.repo.name,
body: `
![badge]
Build Successful! You can find a link to the downloadable artifact below.
| Name | Link |
| -------- | ----------------------- |
| Commit | ${process.env.HEAD_SHA} |
| Logs | ${process.env.JOB_PATH} |
| Download | ${process.env.ARTIFACT_URL} |
### Detailed Evolution Plot
![Detailed Evolution Plot](data:image/png;base64,${imageData})
[badge]: https://img.shields.io/badge/Build_Success!-0d1117?style=for-the-badge&labelColor=3fb950&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBkPSJNMjEuMDMgNS43MmEuNzUuNzUgMCAwIDEgMCAxLjA2bC0xMS41IDExLjVhLjc0Ny43NDcgMCAwIDEtMS4wNzItLjAxMmwtNS41LTUuNzVhLjc1Ljc1IDAgMSAxIDEuMDg0LTEuMDM2bDQuOTcgNS4xOTVMMTkuOTcgNS43MmEuNzUuNzUgMCAwIDEgMS4wNiAwWiI+PC9wYXRoPjwvc3ZnPg==
`
})
14 changes: 11 additions & 3 deletions .github/workflows/precommit-checks.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
name: precommit checks
name: Pre-commit Checks

on:
push:
pull_request:

# Ensures only the latest workflow run for the same branch is active, canceling any in-progress runs.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: '3.9'
- uses: pre-commit/action@v3.0.0
- uses: pre-commit-ci/lite-action@v1.0.1
if: always()


1 change: 0 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ formats: []
# Set the version of Python and other tools you might need
python:
install:
- requirements: requirements.txt
- method: pip
path: .
extra_requirements:
Expand Down
15 changes: 0 additions & 15 deletions online-docs/.readthedocs.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ Default = ISOTROPIC

**--mass-transfer-fa** |br|
Mass Transfer fraction accreted (beta). |br|
Used when ``--mass-transfer-accretion-efficiency-prescription = FIXED_FRACTION``. |br|
Used when ``--mass-transfer-accretion-efficiency-prescription = FIXED``. |br|
Default = 0.5

**--mass-transfer-jloss** |br|
Expand Down
10 changes: 0 additions & 10 deletions online-docs/requirements.txt

This file was deleted.

Loading

0 comments on commit 58912d1

Please sign in to comment.