-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github Actions CI workflow for hiredis: Arm, Arm64, 386, windows. (…
…#943) * Add docker support to test.sh specifying a REDIS_DOCKER env var will run this as a server. * Add initial test workflow * Add workflow test to test 32 bit build * Add ARM x compilation tests * Add tests for windows platform * Test with valgrind
- Loading branch information
1 parent
77e4f09
commit 8491a65
Showing
3 changed files
with
141 additions
and
14 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,102 @@ | ||
name: C/C++ CI | ||
|
||
on: | ||
push: | ||
branches: [ master, dev ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
full-build: | ||
name: Build all, plus default examples, run tests against redis | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
# the docker image used by the test.sh | ||
REDIS_DOCKER: redis:alpine | ||
|
||
steps: | ||
|
||
- name: install prerequisites | ||
run: sudo apt-get update && sudo apt-get install -y libev-dev libevent-dev libglib2.0-dev libssl-dev valgrind | ||
- uses: actions/checkout@v2 | ||
- name: run make | ||
run: make all examples | ||
- name: Run unittests | ||
run: make check | ||
- name: Run tests with valgrind | ||
env: | ||
TEST_PREFIX: valgrind --error-exitcode=100 | ||
SKIPS_ARG: --skip-throughput | ||
run: make check | ||
|
||
build-32-bit: | ||
name: Build and test minimal 32 bit linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: install prerequisites | ||
run: sudo apt-get update && sudo apt-get install gcc-multilib | ||
- uses: actions/checkout@v2 | ||
- name: run make | ||
run: make all | ||
env: | ||
PLATFORM_FLAGS: -m32 | ||
- name: Run unittests | ||
env: | ||
REDIS_DOCKER: redis:alpine | ||
run: make check | ||
|
||
build-arm: | ||
name: Cross-compile and test arm linux with Qemu | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- name: arm | ||
toolset: arm-linux-gnueabi | ||
emulator: qemu-arm | ||
- name: aarch64 | ||
toolset: aarch64-linux-gnu | ||
emulator: qemu-aarch64 | ||
|
||
steps: | ||
- name: install qemu | ||
if: matrix.emulator | ||
run: sudo apt-get install -y qemu-user | ||
- name: install ploatform toolset | ||
if: matrix.toolset | ||
run: sudo apt-get install -y gcc-${{matrix.toolset}} | ||
- uses: actions/checkout@v2 | ||
- name: run make | ||
run: make all | ||
env: | ||
CC: ${{matrix.toolset}}-gcc | ||
AR: ${{matrix.toolset}}-ar | ||
- name: Run unittests | ||
env: | ||
REDIS_DOCKER: redis:alpine | ||
TEST_PREFIX: ${{matrix.emulator}} -L /usr/${{matrix.toolset}}/ | ||
run: make check | ||
|
||
build-windows: | ||
name: Build and test on windows 64 bit Intel | ||
runs-on: windows-latest | ||
steps: | ||
- uses: microsoft/[email protected] | ||
- uses: actions/checkout@v2 | ||
- name: Cmake | ||
run: cmake -Wno-dev CmakeLists.txt | ||
- name: build redis | ||
run: MSBuild hiredis.vcxproj /p:Configuration=Debug | ||
- name: build redis_static | ||
run: MSBuild hiredis_static.vcxproj /p:Configuration=Debug | ||
- name: build redis-test | ||
run: MSBuild hiredis-test.vcxproj /p:Configuration=Debug | ||
# use memurai, redis compatible server, since it is easy to install. Can't | ||
# install official redis containers on the windows runner | ||
- name: install Memurai redis server | ||
run: choco install -y memurai-developer.install | ||
- name: run tests | ||
run: Debug\hiredis-test.exe | ||
|
||
|
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
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