diff options
| author | Bjorn Svensson <bjorn.a.svensson@est.tech> | 2022-11-10 20:20:43 +0100 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-10 11:20:43 -0800 | 
| commit | a36686f84f6b8ecf1a85694fb0462495af7772a4 (patch) | |
| tree | bcde9c70aaa5109f316cb228dc403f7948a5e1be /.github/workflows | |
| parent | 8ad4985e9dd0f8aa377fe0d1dee616d203322320 (diff) | |
| download | hiredict-a36686f84f6b8ecf1a85694fb0462495af7772a4.tar.xz | |
CI updates (#1139)
* Build CMake generated makefiles
* Simplify and update checkout
* Update CI workflow 'C/C++ CI'
* Some corrections of spelling and naming.
* Remove running on branch dev since not officially available.
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build.yml | 42 | ||||
| -rw-r--r-- | .github/workflows/test.yml | 44 | 
2 files changed, 29 insertions, 57 deletions
| diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 027c096..1a1ef51 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,11 +6,7 @@ jobs:      name: Ubuntu      runs-on: ubuntu-latest      steps: -      - name: Checkout code -        uses: actions/checkout@v3 -        with: -          repository: ${{ env.GITHUB_REPOSITORY }} -          ref: ${{ env.GITHUB_HEAD_REF }} +      - uses: actions/checkout@v3        - name: Install dependencies          run: | @@ -24,7 +20,7 @@ jobs:            EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON            CFLAGS: -Werror            CXXFLAGS: -Werror -        run: mkdir build-ubuntu && cd build-ubuntu && cmake .. +        run: mkdir build && cd build && cmake .. && make        - name: Build using makefile          run: USE_SSL=1 TEST_ASYNC=1 make @@ -46,11 +42,7 @@ jobs:      runs-on: ubuntu-latest      container: centos:7      steps: -      - name: Checkout code -        uses: actions/checkout@v3 -        with: -          repository: ${{ env.GITHUB_REPOSITORY }} -          ref: ${{ env.GITHUB_HEAD_REF }} +      - uses: actions/checkout@v3        - name: Install dependencies          run: | @@ -63,7 +55,7 @@ jobs:            EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON            CFLAGS: -Werror            CXXFLAGS: -Werror -        run: mkdir build-centos7 && cd build-centos7 && cmake3 .. +        run: mkdir build && cd build && cmake3 .. && make        - name: Build using Makefile          run: USE_SSL=1 TEST_ASYNC=1 make @@ -86,11 +78,7 @@ jobs:      runs-on: ubuntu-latest      container: rockylinux:8      steps: -      - name: Checkout code -        uses: actions/checkout@v3 -        with: -          repository: ${{ env.GITHUB_REPOSITORY }} -          ref: ${{ env.GITHUB_HEAD_REF }} +      - uses: actions/checkout@v3        - name: Install dependencies          run: | @@ -105,7 +93,7 @@ jobs:            EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON            CFLAGS: -Werror            CXXFLAGS: -Werror -        run: mkdir build-centos8 && cd build-centos8 && cmake .. +        run: mkdir build && cd build && cmake .. && make        - name: Build using Makefile          run: USE_SSL=1 TEST_ASYNC=1 make @@ -127,11 +115,7 @@ jobs:      runs-on: macos-12      name:  FreeBSD      steps: -      - name: Checkout code -        uses: actions/checkout@v3 -        with: -          repository: ${{ env.GITHUB_REPOSITORY }} -          ref: ${{ env.GITHUB_HEAD_REF }} +      - uses: actions/checkout@v3        - name: Build in FreeBSD          uses: vmactions/freebsd-vm@v0 @@ -145,11 +129,7 @@ jobs:      name: macOS      runs-on: macos-latest      steps: -      - name: Checkout code -        uses: actions/checkout@v3 -        with: -          repository: ${{ env.GITHUB_REPOSITORY }} -          ref: ${{ env.GITHUB_HEAD_REF }} +      - uses: actions/checkout@v3        - name: Install dependencies          run: | @@ -168,11 +148,7 @@ jobs:      name: Windows      runs-on: windows-latest      steps: -      - name: Checkout code -        uses: actions/checkout@v3 -        with: -          repository: ${{ env.GITHUB_REPOSITORY }} -          ref: ${{ env.GITHUB_HEAD_REF }} +      - uses: actions/checkout@v3        - name: Install dependencies          run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index baf5c82..af77544 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,25 +2,23 @@ name: C/C++ CI  on:    push: -    branches: [ master, dev ] +    branches: [ master ]    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 +    - 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 +    - uses: actions/checkout@v3 +    - name: Run make        run: make all examples      - name: Run unittests        run: make check @@ -29,15 +27,15 @@ jobs:          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 +    - name: Install prerequisites        run: sudo apt-get update && sudo apt-get install gcc-multilib -    - uses: actions/checkout@v2 -    - name: run make +    - uses: actions/checkout@v3 +    - name: Run make        run: make all        env:          PLATFORM_FLAGS: -m32 @@ -60,14 +58,14 @@ jobs:              emulator: qemu-aarch64      steps: -    - name: install qemu +    - name: Install qemu        if: matrix.emulator -      run: sudo apt-get install  -y qemu-user  -    - name: install ploatform toolset +      run: sudo apt-get install -y qemu-user +    - name: Install platform toolset        if: matrix.toolset        run: sudo apt-get install -y gcc-${{matrix.toolset}} -    - uses: actions/checkout@v2 -    - name: run make +    - uses: actions/checkout@v3 +    - name: Run make        run: make all        env:          CC: ${{matrix.toolset}}-gcc @@ -83,20 +81,18 @@ jobs:      runs-on: windows-latest      steps:        - uses: microsoft/setup-msbuild@v1.0.2 -      - uses: actions/checkout@v2 -      - name: Cmake +      - uses: actions/checkout@v3 +      - name: Run CMake          run: cmake -Wno-dev CmakeLists.txt -      - name: build redis +      - name: Build hiredis          run: MSBuild hiredis.vcxproj /p:Configuration=Debug -      - name: build redis_static +      - name: Build hiredis_static          run: MSBuild hiredis_static.vcxproj /p:Configuration=Debug -      - name: build redis-test +      - name: Build hiredis-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 +      - name: Install Memurai redis server          run: choco install -y memurai-developer.install -      - name: run tests +      - name: Run tests          run: Debug\hiredis-test.exe -       -      
\ No newline at end of file | 
