-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Github Actions CI workflow
Introduce Github Actions CI workflow to compile test Pull Request and push. Add simple build test on Windows, build/install/check for MacOs and advanced test with various compile option for Ubuntu. Signed-off-by: Christian Marangi <[email protected]>
- Loading branch information
Showing
1 changed file
with
106 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,106 @@ | ||
name: Build | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build-windows: | ||
name: Build Windows | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v2 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: nmap | ||
|
||
- name: Checkout mswin32-aux | ||
run: svn checkout https://svn.nmap.org/nmap-mswin32-aux | ||
|
||
- name: Prepare pcre2 | ||
working-directory: nmap\mswin32 | ||
run: | | ||
mkdir build-pcre2 | ||
cd build-pcre2 | ||
cmake.exe -A Win32 ..\..\libpcre\ | ||
- name: Build | ||
working-directory: nmap\mswin32 | ||
run: | | ||
msbuild nmap.sln /p:Configuration="Release" | ||
build-macos: | ||
name: Build Macos | ||
runs-on: macos-latest | ||
|
||
steps: | ||
|
||
- name: Install Deps | ||
run: | | ||
# Use MacOS python instead of brew variant | ||
brew unlink python | ||
pip install build setuptools | ||
# Deps for make check | ||
brew install gobject-introspection gtk+3 | ||
pip install pygobject pycairo | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Configure | ||
run: ./configure --with-openssl="/opt/homebrew/opt/openssl@3" | ||
|
||
- name: Build | ||
run: make | ||
|
||
- name: Install | ||
run: sudo make install | ||
|
||
- name: Check | ||
run: make check | ||
|
||
build-ubuntu: | ||
name: Build Ubuntu | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: False | ||
matrix: | ||
config: | ||
- "--without-openssl" | ||
- "--without-libssh2" | ||
- "--without-liblua" | ||
- "--without-zenmap" | ||
- "--without-ndiff" | ||
- "--with-nping" | ||
- "--with-ncat" | ||
|
||
steps: | ||
- name: Install Deps | ||
run: | | ||
pip install build | ||
# Deps for make check | ||
sudo apt install gobject-introspection gir1.2-gtk-3.0 | ||
pip install pycairo | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Configure | ||
run: ./configure ${{ matrix.config }} | ||
|
||
- name: Build | ||
run: make | ||
|
||
- name: Install | ||
run: sudo make install | ||
|
||
- name: Check | ||
run: make check | ||
|