-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: simple build and test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install cmake libcyaml-dev libjson-c-dev libevent-dev lcov -y | ||
- name: Create makefile | ||
run: | | ||
cmake -S . -B $(pwd)/cmake-build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="--coverage" -DCMAKE_EXE_LINKER_FLAGS="--coverage" | ||
- name: Build | ||
run: | | ||
cmake --build $(pwd)/cmake-build --config Release | ||
#- name: Run tests | ||
# run: | | ||
# exec test | ||
# | ||
|
||
#- name: Generate coverage report | ||
# run: | | ||
# cd $(pwd)/cmake-build | ||
# lcov --capture --directory . --output-file coverage.info | ||
# lcov --remove coverage.info '/usr/*' --output-file coverage.info | ||
# lcov --list coverage.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: simple build and test | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install cmake libcyaml-dev libjson-c-dev libevent-dev -y | ||
- name: Create makefile | ||
run: | | ||
cmake -S . -B $(pwd)/cmake-build -DCMAKE_BUILD_TYPE=Release | ||
- name: Build | ||
run: | | ||
cmake --build $(pwd)/cmake-build --config Release | ||
- name: Upload release asset | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
mv $(pwd)/cmake-build/caster $(pwd)/cmake-build/caster-linux-x64 | ||
gh release upload ${{github.event.release.tag_name}} $(pwd)/cmake-build/caster-linux-x64 | ||