Skip to content

Commit

Permalink
Merge ef003a7 into 7953c33
Browse files Browse the repository at this point in the history
  • Loading branch information
j123b567 committed Jan 16, 2023
2 parents 7953c33 + ef003a7 commit 5b57a6c
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 3 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,93 @@
name: Build
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: install_dependencies
run: sudo apt-get install libcunit1-dev clang

- name: make
run: make clean all test

- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
arch: armv7
distro: ubuntu_latest
install: |
apt-get update -q -y
apt-get install -q -y libcunit1-dev
run: make clean all test

- name: clang_sanitize_address
env:
CC: clang
CFLAGS: -g -O0 -fsanitize=address
LDFLAGS: -g -fsanitize=address
run: make clean test

- name: clang_sanitize_address_device_errors
env:
CC: clang
CFLAGS: -g -O0 -fsanitize=address -DUSE_DEVICE_DEPENDENT_ERROR_INFORMATION=0
LDFLAGS: -g -fsanitize=address
run: make clean test

- name: clang_sanitize_address_nomalloc
env:
CC: clang
CFLAGS: -g -O0 -fsanitize=address -DUSE_MEMORY_ALLOCATION_FREE=0
LDFLAGS: -g -fsanitize=address
run: make clean test

# - name: gcc-c89
# env:
# CFLAGS: -std=c89
# run: make clean all test

# - name: gcc-c90
# env:
# CFLAGS: -std=c90
# run: make clean all test

- name: gcc-c99
env:
CFLAGS: -std=c99
run: make clean all test

- name: gcc-gnu99
env:
CFLAGS: -std=gnu99
run: make clean all test


coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: install_dependencies
run: sudo apt-get install libcunit1-dev lcov

- name: coverage
env:
CFLAGS: -fprofile-arcs -ftest-coverage
LDFLAGS: -lgcov
run: make clean all test

- name: lcov_capture
run: lcov --capture --directory libscpi/ --output-file lcov.info

- name: lcov_cleanup
run: lcov --remove lcov.info '*/test/*' --output-file lcov.info

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
5 changes: 2 additions & 3 deletions README.md
@@ -1,6 +1,8 @@
SCPI parser library v2
===========

![Build status](https://github.com/j123b567/scpi-parser/actions/workflows/main.yml/badge.svg) [![Coverage Status](https://coveralls.io/repos/j123b567/scpi-parser/badge.svg?branch=master&service=github)](https://coveralls.io/github/j123b567/scpi-parser?branch=master)

Documentation
--------
Documentation is available at [http://j123b567.github.io/scpi-parser](http://j123b567.github.io/scpi-parser).
Expand Down Expand Up @@ -57,6 +59,3 @@ SCPI parser library is based on these standards
<tr><td>Channel list<td><code>(@1!2:3!4,5!6)</code></tr>
<tr><td>Character data<td><code>MINimum</code>, <code>DEFault</code>, <code>INFinity</code></tr>
</table>


[![travis build](https://travis-ci.org/j123b567/scpi-parser.svg?branch=master)](https://travis-ci.org/j123b567/scpi-parser) [![Coverage Status](https://coveralls.io/repos/j123b567/scpi-parser/badge.svg?branch=master&service=github)](https://coveralls.io/github/j123b567/scpi-parser?branch=master)

0 comments on commit 5b57a6c

Please sign in to comment.