CI-042 fix Linux packaging artifact globs #7
This file contains hidden or 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
| name: C/C++ CI | |
| on: | |
| push: | |
| branches: [ "**" ] | |
| pull_request: | |
| branches: [ "**" ] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| env: | |
| # The minus sign removes the trailing new line in the last line | |
| cmake_ubuntu_deps: |- | |
| binutils-dev \ | |
| build-essential \ | |
| cmake \ | |
| gettext \ | |
| libboost-all-dev \ | |
| libcrypto++-dev \ | |
| libgd-dev \ | |
| libglib2.0-dev \ | |
| libmaxminddb-dev \ | |
| libreadline-dev \ | |
| libupnp-dev \ | |
| libwxgtk3.2-dev \ | |
| pkg-config \ | |
| wx3.2-headers | |
| cmake_macos_deps: |- | |
| boost \ | |
| cryptopp \ | |
| gd \ | |
| gettext \ | |
| libmaxminddb \ | |
| libupnp \ | |
| pkg-config \ | |
| wxwidgets | |
| cmake_mingw_w64_deps: | | |
| mingw-w64-x86_64-boost | |
| mingw-w64-x86_64-cmake | |
| mingw-w64-x86_64-crypto++ | |
| mingw-w64-x86_64-gettext | |
| mingw-w64-x86_64-libgd | |
| mingw-w64-x86_64-libmaxminddb | |
| mingw-w64-x86_64-ninja | |
| mingw-w64-x86_64-pkgconf | |
| mingw-w64-x86_64-pupnp | |
| mingw-w64-x86_64-readline | |
| mingw-w64-x86_64-toolchain | |
| mingw-w64-x86_64-wxwidgets3.2-msw | |
| mingw-w64-x86_64-zlib | |
| cmake_common_config_flags: |- | |
| -B build \ | |
| -DBUILD_ALC=YES \ | |
| -DBUILD_ALCC=YES \ | |
| -DBUILD_AMULECMD=YES \ | |
| -DBUILD_CAS=YES \ | |
| -DBUILD_DAEMON=YES \ | |
| -DBUILD_WXCAS=YES \ | |
| -DBUILD_ED2K=YES \ | |
| -DBUILD_MONOLITHIC=YES \ | |
| -DBUILD_REMOTEGUI=YES \ | |
| -DBUILD_TESTING=YES \ | |
| -DBUILD_WEBSERVER=YES \ | |
| -DENABLE_NLS=YES \ | |
| -DENABLE_UPNP=YES | |
| cmake_ubuntu_config_flags: |- | |
| -DENABLE_IP2COUNTRY=YES | |
| # ENABLE_NLS will be auto-disabled by cmake/nls.cmake: argz.h is | |
| # a glibc-only header and isn't provided by macOS or Homebrew | |
| cmake_macos_config_flags: |- | |
| -DENABLE_IP2COUNTRY=YES | |
| cmake_mingw_w64_config_flags: |- | |
| -G Ninja \ | |
| -DENABLE_IP2COUNTRY=YES | |
| ctest_flags: |- | |
| --test-dir build \ | |
| --output-on-failure \ | |
| --timeout 10 | |
| jobs: | |
| build_cmake_ubuntu: | |
| name: Build CMake Ubuntu (${{ matrix.build_type }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build_type: [Debug, Release] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: install deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ${{ env.cmake_ubuntu_deps }} | |
| # It seems to run faster without this, but we have to manually list the | |
| # dependencies abobe. | |
| # run: | | |
| # sudo apt-get install devscripts equivs && sudo mk-build-deps -i | |
| - name: create build system | |
| run: | | |
| cmake \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
| ${{ env.cmake_common_config_flags }} \ | |
| ${{ env.cmake_ubuntu_config_flags }} | |
| - name: make | |
| run: cmake --build build | |
| - name: run tests | |
| run: ctest ${{ env.ctest_flags }} | |
| build_cmake_macos: | |
| name: Build CMake MacOS (${{ matrix.build_type }}) | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build_type: [Debug, Release] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: install deps | |
| run: | | |
| brew update | |
| brew install ${{ env.cmake_macos_deps }} | |
| # Homebrew installs into /opt/homebrew on Apple Silicon — not a | |
| # default compiler/linker/pkg-config search path. aMule's custom | |
| # cmake/cryptopp.cmake uses check_include_file_cxx which does NOT | |
| # honour CMAKE_PREFIX_PATH, so export CPATH/LIBRARY_PATH directly. | |
| BREW_PREFIX=$(brew --prefix) | |
| echo "CPATH=$BREW_PREFIX/include" >> "$GITHUB_ENV" | |
| echo "LIBRARY_PATH=$BREW_PREFIX/lib" >> "$GITHUB_ENV" | |
| echo "PKG_CONFIG_PATH=$BREW_PREFIX/lib/pkgconfig:$(brew --prefix gd)/lib/pkgconfig:$(brew --prefix libupnp)/lib/pkgconfig:$(brew --prefix gettext)/lib/pkgconfig" >> "$GITHUB_ENV" | |
| # gettext is keg-only on macOS; add msgfmt to PATH for NLS probe | |
| echo "$(brew --prefix gettext)/bin" >> "$GITHUB_PATH" | |
| - name: create build system | |
| run: | | |
| cmake \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
| ${{ env.cmake_common_config_flags }} \ | |
| ${{ env.cmake_macos_config_flags }} | |
| - name: make | |
| run: cmake --build build | |
| - name: run tests | |
| run: ctest ${{ env.ctest_flags }} | |
| build_cmake_windows_mingw_w64: | |
| name: Build CMake mingw-w64 (${{ matrix.build_type }}) | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build_type: [Debug, Release] | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: set up MSYS2 mingw-w64 | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: ${{ env.cmake_mingw_w64_deps }} | |
| - name: create build system | |
| run: | | |
| cmake \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
| ${{ env.cmake_common_config_flags }} \ | |
| ${{ env.cmake_mingw_w64_config_flags }} | |
| - name: make | |
| run: cmake --build build | |
| - name: run tests | |
| run: ctest ${{ env.ctest_flags }} |