Skip to content

Add Basic CI to the project #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 23, 2025

Conversation

AdityaPandeyCN
Copy link

This PR adds basic CI to the ramtools repository.

Signed-off-by: AdityaPandeyCN <[email protected]>
Signed-off-by: AdityaPandeyCN <[email protected]>
Signed-off-by: AdityaPandeyCN <[email protected]>
@AdityaPandeyCN AdityaPandeyCN marked this pull request as draft August 14, 2025 14:41
@AdityaPandeyCN AdityaPandeyCN marked this pull request as ready for review August 14, 2025 14:44

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file uploaded. Seems huge.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was in the original repository as an example file so added it for testing I can compress it

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can’t we generate that file. It should be some random genetic sequence…

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reduced the file content to some 100 line as most of them were repetitive. Will this work? The file size is now 10 kb

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should work but we should do it as a separate pr.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping.

Copy link
Author

@AdityaPandeyCN AdityaPandeyCN Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I revert to the original file or like generate one ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the example sam file

jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-22.04

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use the newer Ubuntu runner (ubuntu-24.04)

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkout@v5 came out recently, so this can be updated to that.

Comment on lines 17 to 20
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential wget gnupg libtbb-dev

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although you can put it, sudo is redundant on Github runners I believe, as the account you get has admin privileges.

cmake build-essential wget gnupg are already on Github runners (see
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md)

I cannot see where you are using libtbb-dev

run: |
ROOT_URL="https://root.cern/download/root_v6.34.00.Linux-ubuntu22.04-x86_64-gcc11.4.tar.gz"
wget -O root.tar.gz $ROOT_URL
sudo tar -xzf root.tar.gz -C /opt/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant sudo

- name: Configure CMake
run: |
source /opt/root/bin/thisroot.sh
mkdir -p build

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your starting from scratch with each github workflow run, so -p is not needed. build is guaranteed not to exist


- name: Install ROOT
run: |
ROOT_URL="https://root.cern/download/root_v6.34.00.Linux-ubuntu22.04-x86_64-gcc11.4.tar.gz"
Copy link

@mcbarton mcbarton Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

root version 6.36 exists. Are you sure you want 6.34?

You'd need to change the link if you change to Ubuntu 24.04 runner.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried compressing this file when added to the repo to reduce its size from 5.26 MB?

You could then have the ci uncompress the file if yes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reduced the file size by deleting it contents which were repetitive.

@AdityaPandeyCN AdityaPandeyCN marked this pull request as draft August 14, 2025 16:05
Signed-off-by: AdityaPandeyCN <[email protected]>

updating  ci.yml

Signed-off-by: AdityaPandeyCN <[email protected]>

updating versions in ci.yml

Signed-off-by: AdityaPandeyCN <[email protected]>

changes

Signed-off-by: AdityaPandeyCN <[email protected]>

changes

Signed-off-by: AdityaPandeyCN <[email protected]>
@AdityaPandeyCN AdityaPandeyCN marked this pull request as ready for review August 14, 2025 17:08
Comment on lines 23 to 24
echo "LD_LIBRARY_PATH=/opt/root/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "CMAKE_PREFIX_PATH=/opt/root:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look like they are redundant since these variables are set by the thisroot.sh script you source


- name: Configure CMake
run: |
source /opt/root/bin/thisroot.sh

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given /opt/root/bin is now part of the path environment variable (e.g. echo "/opt/root/bin" >> $GITHUB_PATH) then this can just be source thisroot.sh


- name: Build
run: |
source /opt/root/bin/thisroot.sh

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given /opt/root/bin is now part of the path environment variable (e.g. echo "/opt/root/bin" >> $GITHUB_PATH) then this can just be source thisroot.sh


- name: Run tests
run: |
source /opt/root/bin/thisroot.sh

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given /opt/root/bin is now part of the path environment variable (e.g. echo "/opt/root/bin" >> $GITHUB_PATH) then this can just be source thisroot.sh

Comment on lines +28 to +29
sudo apt-get update
sudo apt-get install -y libvdt-dev libtbb-dev

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sudo not needed I believe, since Github runner workflows are on an admin account by default

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run apt-get update Reading package lists... E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ Error: Process completed with exit code 100.
getting permission issues if not using sudo


- name: Install ROOT
run: |
ROOT_URL="https://root.cern/download/root_v6.34.06.Linux-ubuntu24.04-x86_64-gcc13.3.tar.gz"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that you updated to Ubuntu 24.04 , but not to root 6.36 version? There is a root_v6.36.00.Linux-ubuntu24.04-x86_64-gcc13.3.tar.gz file you can download

push:
branches: [add_ci]
pull_request:
branches: [develop]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably change the default branch to main...

Signed-off-by: AdityaPandeyCN <[email protected]>

cleanup5

Signed-off-by: AdityaPandeyCN <[email protected]>
Signed-off-by: AdityaPandeyCN <[email protected]>
Copy link

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vgvassilev vgvassilev merged commit 0df2c87 into compiler-research:develop Aug 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants