forked from igprof/igprof
-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (53 loc) · 1.68 KB
/
ci.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
---
# This workflow will install Python dependencies, run tests and lint with a
# variety of Python versions. For more information see:
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Check PR
'on':
push:
branches:
- master
pull_request:
branches:
- master
jobs:
unittest:
name: ${{ matrix.container }}
strategy:
matrix:
os:
- 'ubuntu-latest'
container:
- 'ubuntu:18.04'
- 'ubuntu:22.04'
- 'fedora:37'
- 'fedora:38'
runs-on: ${{ matrix.os }}
container: ${{ matrix.container}}
steps:
- uses: actions/checkout@v3
- name: Install test dependencies
run: |
case ${{ matrix.container }} in
ubuntu:*)
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y cmake libunwind-dev libpcre3-dev make build-essential
;;
centos:*|fedora:*)
yum update -y
dnf group install -y "C Development Tools and Libraries" "Development Tools"
yum install -y cmake libunwind-devel pcre-devel make
;;
macos:*)
brew install cmake
;;
esac
- name: Build and install
run: |
cmake . -DCMAKE_INSTALL_PREFIX=$PWD/sw -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3 -U_FORTIFY_SOURCE -Wno-attributes -Wunused-result"
make -j 20
make install
export PATH=$PWD/sw/bin:$PATH
export LD_LIBRARY_PATH=$PWD/sw/lib:$LD_LIBRARY_PATH
igprof -o ls.gz -mp ls >/dev/null && igprof-analyse -r MEM_TOTAL ls.gz