Skip to content

Commit b1b2421

Browse files
committed
Initial commit
0 parents  commit b1b2421

File tree

162 files changed

+13229
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+13229
-0
lines changed

.devcontainer.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"image": "mcr.microsoft.com/devcontainers/base:alpine",
3+
"features": {
4+
"ghcr.io/devcontainers/features/nix:1": {
5+
"extraNixConfig": "experimental-features = nix-command flakes"
6+
}
7+
},
8+
"onCreateCommand": "nix shell nixpkgs#gitMinimal -c nix run nixpkgs#home-manager -- switch --flake git+https://code.europa.eu/ecphp/devs-profile#light --impure",
9+
"customizations": {
10+
"vscode": {
11+
"settings": {
12+
"terminal.integrated.defaultProfile.linux": "fish"
13+
}
14+
}
15+
}
16+
}

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
indent_size = 4
5+
charset = utf-8
6+
end_of_line = lf
7+
trim_trailing_whitespace = true
8+
9+
[Makefile]
10+
indent_style = tab
11+
12+
[*.{tex,cls,lua,nix,typ,md}]
13+
trim_trailing_whitespace = false
14+
indent_style = space
15+
indent_size = 2
16+
max_line_length = 80

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake .

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @drupol

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
open-pull-requests-limit: 10

.github/settings.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# https://github.com/probot/settings
2+
3+
branches:
4+
- name: main
5+
protection:
6+
enforce_admins: false
7+
required_pull_request_reviews:
8+
dismiss_stale_reviews: true
9+
require_code_owner_reviews: true
10+
required_approving_review_count: 1
11+
restrictions: null
12+
required_linear_history: true
13+
- name: update_flake_lock_action
14+
protection:
15+
enforce_admins: false
16+
required_pull_request_reviews:
17+
dismiss_stale_reviews: true
18+
require_code_owner_reviews: false
19+
restrictions: null
20+
required_linear_history: true
21+
22+
labels:
23+
- name: bug
24+
color: ee0701
25+
26+
- name: dependencies
27+
color: 0366d6
28+
29+
- name: enhancement
30+
color: 0e8a16
31+
32+
- name: question
33+
color: cc317c
34+
35+
- name: security
36+
color: ee0701
37+
38+
- name: stale
39+
color: eeeeee
40+
41+
repository:
42+
allow_merge_commit: true
43+
allow_rebase_merge: true
44+
allow_squash_merge: true
45+
default_branch: main
46+
description: "Pol Dellaiera's Master Thesis - Reproducibility In Software Engineering"
47+
homepage: https://github.com/drupol/master-thesis
48+
topics: master-thesis,umons
49+
has_downloads: true
50+
has_issues: true
51+
has_pages: false
52+
has_projects: false
53+
has_wiki: false
54+
name: master-thesis
55+
private: true

.github/workflows/build-main.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "src/**"
9+
- "resources/**"
10+
- "**.nix"
11+
- ".github/workflows/*.yml"
12+
13+
jobs:
14+
dependencies:
15+
name: Build dependencies
16+
runs-on: ubuntu-latest
17+
outputs:
18+
branch: ${{ steps.extract_branch.outputs.branch }}
19+
20+
steps:
21+
- name: Check out source files
22+
uses: actions/checkout@v4
23+
24+
- name: Extract branch name
25+
shell: bash
26+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
27+
id: extract_branch
28+
29+
build:
30+
name: Build PDF files
31+
runs-on: ubuntu-latest
32+
needs: [dependencies]
33+
34+
steps:
35+
- name: Set git to use LF
36+
run: |
37+
git config --global core.autocrlf false
38+
git config --global core.eol lf
39+
40+
- name: Check out source files
41+
uses: actions/checkout@v4
42+
43+
- name: Install Nix
44+
uses: DeterminateSystems/nix-installer-action@main
45+
46+
- name: Build document
47+
run: |
48+
mkdir -p output
49+
nix build .#thesis --out-link result-thesis --quiet
50+
cp -vr --dereference $(readlink -f result-thesis) thesis
51+
cp -ar thesis/* output/
52+
53+
- name: Upload build assets
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: artefacts
57+
path: output
58+
59+
assets:
60+
name: Create release
61+
runs-on: ubuntu-latest
62+
needs: [dependencies, build]
63+
64+
steps:
65+
- name: Download build assets (${{ matrix.assets.input }})
66+
uses: actions/download-artifact@v4
67+
68+
- name: Rename files
69+
working-directory: artefacts
70+
run: |
71+
for f in *.pdf; do cp ${f} ../$(printf '%s\n' "${{ github.run_number }}--${f%.pdf}--${{ github.sha }}.pdf"); done
72+
73+
- name: Create pre-release (v${{ github.run_number }}-${{ github.sha }})
74+
id: create_release
75+
uses: softprops/action-gh-release@v2
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
with:
79+
tag_name: v${{ github.run_number }}-${{ github.sha }}
80+
name: Release ${{ github.run_number }} (${{ github.sha }})
81+
draft: false
82+
prerelease: true
83+
files: |
84+
./*.pdf

.github/workflows/build-pr.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build PR
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
name: Build PDF files
9+
runs-on: ubuntu-latest
10+
if: github.ref != 'refs/heads/main'
11+
12+
steps:
13+
- name: Set git to use LF
14+
run: |
15+
git config --global core.autocrlf false
16+
git config --global core.eol lf
17+
18+
- name: Check out source files
19+
uses: actions/checkout@v4
20+
21+
- name: Install Nix
22+
uses: DeterminateSystems/nix-installer-action@main
23+
24+
- name: Extract branch name
25+
shell: bash
26+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
27+
id: extract_branch
28+
29+
- name: Build document
30+
run: |
31+
nix build .#thesis --out-link result-thesis --quiet
32+
cp -vr --dereference $(readlink -f result-thesis) thesis
33+
mkdir -p artefacts
34+
cp -ar thesis/* artefacts/
35+
36+
- name: Rename files
37+
working-directory: artefacts
38+
run: |
39+
for f in *.pdf; do mv ${f} $(printf '%s\n' "${{ github.run_number }}--${f%.pdf}--${{ github.sha }}.pdf"); done
40+
41+
- name: Upload build assets
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: pdf--branch-${{ steps.extract_branch.outputs.branch }}--${{ github.sha }}
45+
path: artefacts
46+
if-no-files-found: error

.github/workflows/comment-pr.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
name: Comment Artifact URL on PR
3+
4+
on:
5+
workflow_run:
6+
types:
7+
- "completed"
8+
workflows:
9+
- "Build PR"
10+
11+
jobs:
12+
comment:
13+
if: github.event.workflow_run.conclusion == 'success'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Get Artifact and Pull request info
17+
env:
18+
GITHUB_TOKEN: ${{ github.token }}
19+
WORKFLOW_RUN_EVENT_OBJ: ${{ toJSON(github.event.workflow_run) }}
20+
OWNER: ${{ github.repository_owner }}
21+
REPO: ${{ github.event.repository.name }}
22+
run: |
23+
PREVIOUS_JOB_ID=$(jq -r '.id' <<< "$WORKFLOW_RUN_EVENT_OBJ")
24+
echo "Previous Job ID: $PREVIOUS_JOB_ID"
25+
echo "PREVIOUS_JOB_ID=$PREVIOUS_JOB_ID" >> "$GITHUB_ENV"
26+
27+
SUITE_ID=$(jq -r '.check_suite_id' <<< "$WORKFLOW_RUN_EVENT_OBJ")
28+
echo "Previous Suite ID: $SUITE_ID"
29+
echo "SUITE_ID=$SUITE_ID" >> "$GITHUB_ENV"
30+
31+
ARTIFACT_ID=$(gh api "/repos/$OWNER/$REPO/actions/artifacts" \
32+
--jq ".artifacts.[] |
33+
select(.workflow_run.id==${PREVIOUS_JOB_ID}) |
34+
select(.expired==false) |
35+
.id")
36+
37+
echo "Artifact ID: $ARTIFACT_ID"
38+
echo "ARTIFACT_ID=$ARTIFACT_ID" >> "$GITHUB_ENV"
39+
40+
PR_NUMBER=$(jq -r '.pull_requests[0].number' \
41+
<<< "$WORKFLOW_RUN_EVENT_OBJ")
42+
43+
echo "Pull request Number: $PR_NUMBER"
44+
echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_ENV"
45+
46+
HEAD_SHA=$(jq -r '.pull_requests[0].head.sha' \
47+
<<< "$WORKFLOW_RUN_EVENT_OBJ")
48+
49+
echo "Head SHA: $HEAD_SHA"
50+
echo "HEAD_SHA=$HEAD_SHA" >> "$GITHUB_ENV"
51+
- name: Find Comment
52+
uses: peter-evans/find-comment@v3
53+
id: find-comment
54+
with:
55+
issue-number: ${{ env.PR_NUMBER }}
56+
comment-author: "github-actions[bot]"
57+
- name: Update Comment
58+
env:
59+
JOB_PATH: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ env.PREVIOUS_JOB_ID }}"
60+
ARTIFACT_URL: "${{ github.server_url }}/${{ github.repository }}/suites/${{ env.SUITE_ID }}/artifacts/${{ env.ARTIFACT_ID }}"
61+
HEAD_SHA: "${{ env.HEAD_SHA }}"
62+
uses: peter-evans/create-or-update-comment@v4
63+
with:
64+
issue-number: ${{ env.PR_NUMBER }}
65+
comment-id: ${{ steps.find-comment.outputs.comment-id }}
66+
edit-mode: replace
67+
body: |-
68+
![badge]
69+
70+
Build Successful! You can find a link to the downloadable artifact below.
71+
72+
| Name | Link |
73+
| -------- | ----------------------- |
74+
| Commit | ${{ env.HEAD_SHA }} |
75+
| Logs | ${{ env.JOB_PATH }} |
76+
| Download | ${{ env.ARTIFACT_URL }} |
77+
78+
[badge]: https://img.shields.io/badge/Build_Success!-0d1117?style=for-the-badge&labelColor=3fb950&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBkPSJNMjEuMDMgNS43MmEuNzUuNzUgMCAwIDEgMCAxLjA2bC0xMS41IDExLjVhLjc0Ny43NDcgMCAwIDEtMS4wNzItLjAxMmwtNS41LTUuNzVhLjc1Ljc1IDAgMSAxIDEuMDg0LTEuMDM2bDQuOTcgNS4xOTVMMTkuOTcgNS43MmEuNzUuNzUgMCAwIDEgMS4wNiAwWiI+PC9wYXRoPjwvc3ZnPg==

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/.cache/
2+
/.devenv/
3+
/.direnv/
4+
/build/
5+
/.vscode/
6+
/out/
7+
*.bak*
8+
indent.log
9+
/result
10+
/*.pdf
11+
/*.pdfpc
12+
/src/**/*.pdf
13+
lib/**/output
14+
lib/**/result
15+
lib/**/*.pdf
16+
/trunk/
17+
cert.pem
18+
private-key.pem

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/.direnv/
2+
/.idea/
3+
/vendor/
4+
/docs/
5+
/build/
6+
CHANGELOG.md

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"proseWrap": "always"
3+
}

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CC-BY-4.0 OR Hippocratic-2.1

0 commit comments

Comments
 (0)