Repository navigation
Implement the CI in GitHub Actions #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
illwieckz
wants to merge
15
commits into
master
Choose a base branch
from
illwieckz/ci
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
08dde58
makefile: only use vendored macOS headers on non-macOS build systems
illwieckz 6002ef0
makefile: enable the building of dump_syms_mac on every system
illwieckz 8dd85f2
src/common/mac/byteswap: define byteswap symbols for MinGW
illwieckz 10df4b2
src/common/mac/macho_walker: add compat/linux.h compatibility to defi…
illwieckz ff42be1
src/common/memory_allocator: preserve 64-bit alignment masks
illwieckz d2ce453
src/client/linux/minidump_writer: make minidump stack-skipping test m…
illwieckz c6fecaa
configure: detect macOS build machine
illwieckz b7bf2a0
configure: drop the now unused X86_HOST variable
illwieckz 8640b7b
src/common/windows/http_upload: the ifdef is HAVE_LIBZ, not HAVE_ZLIB
illwieckz 4b26a7e
ci: implement build_test github action
illwieckz 85198ec
configure,src/common/linux/dump_symbols: make possible to disable dec…
illwieckz 4a4ec0c
m4: copy pkg.m4 frrom pkgconf 1.8.1
illwieckz 95a1356
makefile,configure: rework the zstd enablement
illwieckz 5b2c61d
makefile: dump_syms tests
illwieckz 76ee812
tests: add dump_syms test symbolizing a bunch of binaries
illwieckz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,178 @@ | ||
| # Documentation: https://wiki.unvanquished.net/wiki/Continuous_integration | ||
|
|
||
| name: Build | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - 'for-*.*.*/sync' # Next-release branch | ||
| pull_request: | ||
| branches: | ||
| - '**' | ||
| paths: | ||
| - '.github/workflows/build_test.yml' | ||
| - '.gitmodules' | ||
| # 'android/**' | ||
| - 'autotools/**' | ||
| - 'compat/**' | ||
| - configure.ac | ||
| - DEPS | ||
| - fetch-externals | ||
| - 'm4/**' | ||
| - Makefile.am | ||
| - 'src/**' | ||
| - 'test/**' | ||
| - 'wine/**' | ||
|
|
||
| jobs: | ||
| build: | ||
| name: ${{ matrix.name }} | ||
| runs-on: ${{ matrix.vm_image }} | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - name: Linux amd64 GCC | ||
| vm_image: ubuntu-22.04 | ||
| apt_packages: g++-12 libcurl4-openssl-dev | ||
| env_commands: export CC=gcc-12 CXX=g++-12 | ||
| - name: Linux i686 GCC | ||
| # This platform reliably caught in CI the random thread-related | ||
| # bug src/client/linux/linux_client_unittest, making it possible | ||
| # to track down and debug it. It also catches more pointer type | ||
| # mismatches, thanks to the different sizes. In the end it helps | ||
| # improving robustness. | ||
| vm_image: ubuntu-22.04 | ||
| apt_architecture: i386 | ||
| apt_packages: g++-i686-linux-gnu libcurl4-openssl-dev:i386 zlib1g-dev:i386 libzstd-dev:i386 | ||
| env_commands: export CC=i686-linux-gnu-gcc CXX=i686-linux-gnu-g++ | ||
| - name: Linux arm64 GCC | ||
| vm_image: ubuntu-22.04-arm | ||
| apt_packages: g++-12 libcurl4-openssl-dev binutils-x86-64-linux-gnu | ||
| env_commands: export CC=gcc-12 CXX=g++-12 | ||
| - name: Linux amd64 Clang | ||
| vm_image: ubuntu-22.04 | ||
| apt_packages: clang libcurl4-openssl-dev | ||
| env_commands: export CC=clang CXX=clang++ | ||
| - name: Windows amd64 MinGW | ||
| vm_image: ubuntu-26.04 | ||
| apt_packages: g++-mingw-w64-x86-64 mingw-w64-x86-64-dev wine libcurl4-openssl-dev libz-mingw-w64-dev | ||
| mingw_flavor: posix | ||
| env_commands: export TESTDRIVER_SHARED_TEMP_WINEPREFIX=true | ||
| # There is no libzstd-mingw-w64-dev. | ||
| configure_options: --host=x86_64-w64-mingw32 --enable-static-mingw --disable-zstd | ||
| - name: Windows arm64 MinGW | ||
| vm_image: windows-11-arm | ||
| shell: msys2 {0} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's {0}? |
||
| msystem: CLANGARM64 | ||
| pacman_packages: base-devel mingw-w64-clang-aarch64-clang mingw-w64-clang-aarch64-gcc-compat autoconf automake libtool | ||
| env_commands: export CC=aarch64-w64-mingw32-gcc CXX=aarch64-w64-mingw32-g++ | ||
| configure_options: --host=aarch64-w64-mingw32 --enable-static-mingw | ||
| - name: macOS amd64 AppleClang | ||
| vm_image: macos-15-intel | ||
| brew_packages: autoconf automake libtool zstd | ||
| nproc_command: sysctl -n hw.logicalcpu | ||
| - name: macOS arm64 AppleClang | ||
| vm_image: macos-15 | ||
| brew_packages: autoconf automake libtool zstd | ||
| nproc_command: sysctl -n hw.logicalcpu | ||
|
|
||
| env: | ||
| ENV_COMMANDS: ${{ matrix.env_commands }} | ||
| NPROC_COMMAND: ${{ matrix.nproc_command || 'nproc' }} | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: ${{ matrix.shell || 'bash' }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v7 | ||
|
|
||
| - name: Checkout dependencies | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Grammar nit: as a verb it should be check out, with a space. Likewise set up instead of setup in all cases except Setup commands. |
||
| # This doesn't require the MSYS2 shell, so we can run this before the MSYS2 setup, | ||
| # and we don't have to install fetch-externals' dependencies in MSYS2 environment | ||
| # like python and git which are already provided in the default Git bash environment. | ||
| shell: bash | ||
| run: | | ||
| # To fetch googletest. | ||
| ./fetch-externals | ||
|
|
||
| - name: Setup MSYS2 packages | ||
| if: ${{ matrix.pacman_packages != '' }} | ||
| uses: msys2/setup-msys2@v2 | ||
| with: | ||
| msystem: ${{ matrix.msystem }} | ||
| install: ${{ matrix.pacman_packages }} | ||
| update: true | ||
|
|
||
| - name: Setup Apt architecture | ||
| env: | ||
| APT_ARCHITECTURE: ${{ matrix.apt_architecture }} | ||
| if: ${{ matrix.apt_architecture != '' }} | ||
| run: | | ||
| set -xueo pipefail | ||
| sudo dpkg --add-architecture "${APT_ARCHITECTURE}" | ||
|
|
||
| - name: Setup Apt packages | ||
| env: | ||
| APT_PACKAGES: ${{ matrix.apt_packages }} | ||
| if: ${{ matrix.apt_packages != '' }} | ||
| run: | | ||
| set -xueo pipefail | ||
| sudo apt-get update | ||
| sudo apt-get -y -q --no-install-recommends install ${APT_PACKAGES} | ||
|
|
||
| - name: Setup Apt MinGW flavor | ||
| env: | ||
| MINGW_FLAVOR: ${{ matrix.mingw_flavor }} | ||
| if: ${{ matrix.apt_packages != '' && matrix.mingw_flavor != '' }} | ||
| run: | | ||
| set -xue pipefail | ||
| sudo update-alternatives --set x86_64-w64-mingw32-gcc "/usr/bin/x86_64-w64-mingw32-gcc-${MINGW_FLAVOR}" | ||
| sudo update-alternatives --set x86_64-w64-mingw32-g++ "/usr/bin/x86_64-w64-mingw32-g++-${MINGW_FLAVOR}" | ||
|
|
||
| - name: Setup Brew packages | ||
| env: | ||
| BREW_PACKAGES: ${{ matrix.brew_packages }} | ||
| if: ${{ matrix.brew_packages != '' }} | ||
| run: | | ||
| set -xueo pipefail | ||
| brew update | ||
| brew install ${BREW_PACKAGES} | ||
|
|
||
| - name: Setup commands | ||
| env: | ||
| SETUP_COMMANDS: ${{ matrix.setup_commands }} | ||
| if: ${{ matrix.setup_commands != '' }} | ||
| run: | | ||
| set -xueo pipefail | ||
| ${SETUP_COMMANDS} | ||
|
|
||
| - name: Build | ||
| env: | ||
| CONFIGURE_OPTIONS: ${{ matrix.configure_options }} | ||
| run: | | ||
| set -xueo pipefail | ||
| ${ENV_COMMANDS} | ||
| parallelism="$(${NPROC_COMMAND})" | ||
| echo "Build parallelism: ${parallelism}" | ||
| export MAKEFLAGS="-j${parallelism}" | ||
| autoreconf -fvi | ||
| if ! ./configure --enable-zstd ${CONFIGURE_OPTIONS}; then | ||
| [ ! -f config.log ] || cat config.log | ||
| false | ||
| fi | ||
| make | ||
|
|
||
| - name: Test | ||
| run: | | ||
| set -xueo pipefail | ||
| ${ENV_COMMANDS} | ||
| parallelism="$(${NPROC_COMMAND})" | ||
| export MAKEFLAGS="-j${parallelism}" | ||
| if ! make check; then | ||
| [ ! -f test-suite.log ] || cat test-suite.log | ||
| false | ||
| fi | ||
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the CI use wine instead of real windows?