-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.34 KB
/
test.yml
File metadata and controls
57 lines (46 loc) · 1.34 KB
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
name: test
on:
push:
branches: '**'
workflow_dispatch:
jobs:
version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Get the package version
id: version
run: |
version=$(sed -rn "/^PACKAGE_VERSION=/ s/^.*='(.*)'/\1/p" configure)
date=${version##*.}
expected_date=$(date -u +"%Y%m%d")
# verify patch date
if [[ ${date} != ${expected_date} ]]; then
echo outdated scallop patch date: ${date}
exit 1
fi
echo "version=${version}" >> $GITHUB_OUTPUT
test:
needs: version
runs-on: ubuntu-latest
env:
VERSION: ${{ needs.version.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Build and install
run: |
# configure using required scallop options
./configure-scallop
# build static and shared libraries
make -j libscallop.a libscallop.so
# install shared library and headers
sudo make install-library install-headers
- name: Test
run: |
# verify shared library is installed and pkg-config works as expected
pkg-config --modversion scallop
pkg-config --exact-version ${VERSION} scallop