File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : test
2+
3+ on :
4+ push :
5+ branches : ' **'
6+ workflow_dispatch :
7+
8+ jobs :
9+ version :
10+ runs-on : ubuntu-latest
11+ outputs :
12+ version : ${{ steps.version.outputs.version }}
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v6
16+
17+ - name : Get the package version
18+ id : version
19+ run : |
20+ version=$(sed -rn "/^PACKAGE_VERSION=/ s/^.*='(.*)'/\1/p" configure)
21+ date=${version##*.}
22+ expected_date=$(date -u +"%Y%m%d")
23+
24+ # verify patch date
25+ if [[ ${date} != ${expected_date} ]]; then
26+ echo outdated scallop patch date: ${date}
27+ exit 1
28+ fi
29+
30+ echo "version=${version}" >> $GITHUB_OUTPUT
31+
32+ test :
33+ needs : version
34+ runs-on : ubuntu-latest
35+ env :
36+ VERSION : ${{ needs.version.outputs.version }}
37+
38+ steps :
39+ - name : Checkout code
40+ uses : actions/checkout@v6
41+
42+ - name : Build and install
43+ run : |
44+ # configure using required scallop options
45+ ./configure-scallop
46+
47+ # build static and shared libraries
48+ make -j libscallop.a libscallop.so
49+
50+ # install shared library and headers
51+ sudo make install-library install-headers
52+
53+ - name : Test
54+ run : |
55+ # verify shared library is installed and pkg-config works as expected
56+ pkg-config --modversion scallop
57+ pkg-config --exact-version ${VERSION} scallop
You can’t perform that action at this time.
0 commit comments