-
Notifications
You must be signed in to change notification settings - Fork 6
126 lines (115 loc) · 3.46 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Linux
on:
pull_request:
push:
branches: [ main ]
tags: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
# build
#########################################################
build_hipo:
name: Build HIPO
runs-on: ubuntu-latest
steps:
- name: checkout hipo
uses: actions/checkout@v4
with:
repository: gavalian/hipo
- name: build
run: |
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=hipo
cmake --build build -j2
cmake --install build
- run: tree hipo
- name: tar
run: tar czvf hipo{.tar.gz,}
- uses: actions/upload-artifact@v3
with:
name: build
retention-days: 1
path: hipo.tar.gz
build_iguana:
name: Build Iguana
needs: [ build_hipo ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup fmt
run: sudo apt install -y libfmt-dev
- name: setup meson
run: python -m pip install meson ninja
- name: summarize dependencies
run: |
echo '### Dependencies' >> $GITHUB_STEP_SUMMARY
echo '| Dependency | Version |' >> $GITHUB_STEP_SUMMARY
echo '| --- | --- |' >> $GITHUB_STEP_SUMMARY
for dep in python ruby meson ninja ; do
echo "| \`$dep\` | $($dep --version) |" >> $GITHUB_STEP_SUMMARY
done
echo "| \`fmt\` | $(apt show libfmt-dev | grep -w Version) |" >> $GITHUB_STEP_SUMMARY
- name: get build artifacts
uses: actions/download-artifact@v3
with:
name: build
- name: untar build
run: ls *.tar.gz | xargs -I{} tar xzvf {}
- name: build iguana
run: ./install.rb --hipo hipo
- name: dump build log
if: always()
run: cat build-iguana/meson-logs/meson-log.txt
- run: tree iguana
- name: tar
run: tar czvf iguana{.tar.gz,}
- uses: actions/upload-artifact@v3
with:
name: build
retention-days: 1
path: iguana.tar.gz
# download test data
#########################################################
download_validation_files:
name: Download validation files
runs-on: ubuntu-latest
steps:
- name: download
run: wget --no-check-certificate http://clasweb.jlab.org/clas12offline/distribution/clas12-timeline/validation_files.tar.gz
- name: list
run: tar tzvf validation_files.tar.gz
- uses: actions/upload-artifact@v3
with:
name: validation_files
retention-days: 1
path: validation_files.tar.gz
# download test data
#########################################################
test_iguana:
name: Test Iguana
needs: [ download_validation_files, build_iguana ]
runs-on: ubuntu-latest
steps:
- name: get build artifacts
uses: actions/download-artifact@v3
with:
name: build
- name: get test data
uses: actions/download-artifact@v3
with:
name: validation_files
- name: untar artifacts
run: |
ls *.tar.gz | xargs -I{} tar xzvf {}
rm -v *.tar.gz
- name: tree artifacts
run: tree
- name: run test
run: |
test_file=$(find validation_files -name "*.hipo" | head -n1)
echo "TEST FILE = $test_file"
iguana/bin/run $test_file