Skip to content

Commit 7dcd864

Browse files
committed
Modifying (to correct and improve) the code for checking compilation in a GitHub Action Workflow
1 parent 29b2297 commit 7dcd864

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

.github/workflows/softwarecheck.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,49 @@ on:
44
pull_request:
55
types: [opened]
66
jobs:
7-
py3-job:
7+
check_compile-job:
88
runs-on: ubuntu-latest
9-
container: cmscloud/al9-cms:latest
9+
container:
10+
image: cmscloud/al9-cms:latest
11+
options: --user root
1012
steps:
11-
- name: Checking_python_3.9
13+
- name: Checking_out_code
1214
uses: actions/checkout@v4
1315
with:
1416
fetch-depth: 0
15-
- run: |
17+
- name: Checking_python_3.9
18+
run: |
1619
python3 -V
1720
ls
1821
pwd
1922
python3 -m py_compile src/cmsstyle/cmsstyle.py
20-
python3 -m py_compil src/cmsstyle/cmsstyle.py
21-
- run: |
23+
ls -lh src/cmsstyle/__pycache__/
24+
- name: Checking_Cpp_compilation
25+
run: |
2226
cd src
2327
echo '{gROOT->LoadMacro("cmsstyle.C++");}' > hola.C
28+
29+
dnf install -y root
30+
echo 'ROOT VERSION='`root-config --version`
2431
root -q hola.C
25-
ls cmsstyle_C.sod
32+
ls -lh cmsstyle_C.so
2633
#
2734
py2-job:
2835
runs-on: ubuntu-latest
29-
container: cmscloud/cc7-cms:latest
36+
container:
37+
image: cmscloud/cc7-cms:latest
38+
options: --user root
3039
steps:
3140
- name: Checking_python_2.7
32-
uses: actions/checkout@v4
33-
with:
34-
fetch-depth: 0
35-
- run: |
41+
# uses: actions/checkout@v4
42+
# with:
43+
# fetch-depth: 0
44+
run: |
3645
python -V
3746
ls
47+
git clone --depth 1 https://github.com/oglez/cmsstyle.git
48+
cd cmsstyle
3849
pwd
3950
python -m py_compile src/cmsstyle/cmsstyle.py
51+
ls -lh src/cmsstyle/cmsstyle.pyc
4052
#

0 commit comments

Comments
 (0)