-
Notifications
You must be signed in to change notification settings - Fork 2
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
41 additions
and
19 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,37 @@ | ||
name: Compile on amd64 | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
connect-type: | ||
required: true | ||
type: string | ||
debug-flag: | ||
required: false | ||
type: boolean | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: cpp | ||
env: | ||
TOOLCHAIN: "g++-" | ||
LIBRARIES: "libspdlog-dev libpcap-dev protobuf-compiler libprotobuf-dev" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Update apt | ||
run: sudo apt update | ||
|
||
- name: Install apt packages | ||
run: sudo apt-get --yes install ${{ env.TOOLCHAIN }} ${{ env.LIBRARIES }} | ||
|
||
- name: Build debug strings | ||
if: ${{ inputs.debug-flag }} | ||
run: | | ||
echo "debug_flag_compile=DEBUG\=1" >> $GITHUB_ENV | ||
- name: Compile | ||
run: make all -j $(nproc) CONNECT_TYPE=${{ inputs.connect-type }} ${{ env.debug_flag_compile }} |
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