Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cJSON
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
libraries
cJSON
Commits
44d2ae71e471
Commit
44d2ae71e471
authored
4 years ago
by
Alanscut
Browse files
Options
Downloads
Patches
Plain Diff
add github actions CI
parent
f69a0590c569
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/CI.yml
+102
-0
102 additions, 0 deletions
.github/workflows/CI.yml
with
102 additions
and
0 deletions
.github/workflows/CI.yml
0 → 100644
+
102
−
0
View file @
44d2ae71
name
:
CI
on
:
push
:
branches
:
[
master
]
paths-ignore
:
-
'
**.md'
-
'
LICENSE'
pull_request
:
types
:
[
opened
,
synchronize
]
paths-ignore
:
-
'
**.md'
-
'
LICENSE'
jobs
:
linux
:
runs-on
:
ubuntu-latest
if
:
"
!contains(github.event.head_commit.message,
'ci
skip')"
strategy
:
fail-fast
:
false
matrix
:
mem_check
:
-
ENABLE_VALGRIND
-
ENABLE_SANITIZERS
-
NONE_MEM_CHECK
compiler
:
-
GCC
-
CLANG
steps
:
-
uses
:
actions/checkout@v2
-
name
:
install build dependencies
run
:
|
sudo apt-get update
sudo apt-get install clang-8 valgrind
-
name
:
build and test
shell
:
bash
run
:
|
if [ "${{ matrix.mem_check }}" == "ENABLE_VALGRIND" ]; then
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=ON -DENABLE_SAFE_STACK=ON -DENABLE_SANITIZERS=OFF"
elif [ "${{ matrix.mem_check }}" == "ENABLE_SANITIZERS" ]; then
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=OFF -DENABLE_SAFE_STACK=OFF -DENABLE_SANITIZERS=ON"
else
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=OFF -DENABLE_SAFE_STACK=OFF -DENABLE_SANITIZERS=OFF"
fi
if [ "${{ matrix.compiler }}" == "GCC" ]; then
export CC=gcc
else
export CC=clang
fi
#run build and test
JOBS=20
export CTEST_PARALLEL_LEVEL=$JOBS
export CTEST_OUTPUT_ON_FAILURE=1
mkdir -p build
cd build
echo [cmake]: cmake .. $EVENT_CMAKE_OPTIONS
cmake .. $EVENT_CMAKE_OPTIONS || (rm -rf * && cmake .. $EVENT_CMAKE_OPTIONS)
cmake --build .
make
make test
macos
:
runs-on
:
macos-latest
if
:
"
!contains(github.event.head_commit.message,
'ci
skip')"
strategy
:
fail-fast
:
false
matrix
:
mem_check
:
-
ENABLE_VALGRIND
-
ENABLE_SANITIZERS
-
NONE_MEM_CHECK
compiler
:
-
GCC
-
CLANG
steps
:
-
uses
:
actions/checkout@v2
-
name
:
build and test
shell
:
bash
run
:
|
if [ "${{ matrix.mem_check }}" == "ENABLE_VALGRIND" ]; then
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=ON -DENABLE_SAFE_STACK=ON -DENABLE_SANITIZERS=OFF"
elif [ "${{ matrix.mem_check }}" == "ENABLE_SANITIZERS" ]; then
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=OFF -DENABLE_SAFE_STACK=OFF -DENABLE_SANITIZERS=ON"
else
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=OFF -DENABLE_SAFE_STACK=OFF -DENABLE_SANITIZERS=OFF"
fi
if [ "${{ matrix.compiler }}" == "GCC" ]; then
export CC=gcc
else
export CC=clang
fi
#run build and test
JOBS=20
export CTEST_PARALLEL_LEVEL=$JOBS
export CTEST_OUTPUT_ON_FAILURE=1
mkdir -p build
cd build
echo [cmake]: cmake .. $EVENT_CMAKE_OPTIONS
cmake .. $EVENT_CMAKE_OPTIONS || (rm -rf * && cmake .. $EVENT_CMAKE_OPTIONS)
cmake --build .
make
make test
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment