diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-09-24 03:47:43 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 03:47:43 +0600 |
commit | 8d49eac97345aacd9877b88afe638abac002d3f0 (patch) | |
tree | aee22304100c1a73a4733596351d4ab972afaee2 | |
parent | 5cee6930616250c6a45fc5af115656a5a7edad52 (diff) | |
parent | 04fb47f5432ad4e660cdedfa3490ac738d737aaf (diff) | |
download | rspamd-8d49eac97345aacd9877b88afe638abac002d3f0.tar.gz rspamd-8d49eac97345aacd9877b88afe638abac002d3f0.zip |
Merge pull request #5153 from rspamd/vstakhov-ci-try
Add more build targets
-rw-r--r-- | .github/workflows/ci.yml | 18 | ||||
-rw-r--r-- | .github/workflows/ci_rspamd_build.yml | 51 |
2 files changed, 69 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d92d5105e..07c4cc4d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,3 +23,21 @@ jobs: with: image: ghcr.io/rspamd/rspamd-build-docker:ubuntu-ci name: ubuntu-ci + + ubuntu-focal: + uses: ./.github/workflows/ci_rspamd_build.yml + with: + image: ghcr.io/rspamd/rspamd-build-docker:ubuntu-focal + name: ubuntu-focal + + centos-8: + uses: ./.github/workflows/ci_rspamd_build.yml + with: + image: ghcr.io/rspamd/rspamd-build-docker:centos-8 + name: centos-8 + + centos-9: + uses: ./.github/workflows/ci_rspamd_build.yml + with: + image: ghcr.io/rspamd/rspamd-build-docker:centos-9 + name: centos-9 diff --git a/.github/workflows/ci_rspamd_build.yml b/.github/workflows/ci_rspamd_build.yml new file mode 100644 index 000000000..aa12c9c6e --- /dev/null +++ b/.github/workflows/ci_rspamd_build.yml @@ -0,0 +1,51 @@ +name: rspamd_build + +on: + workflow_call: + inputs: + image: + required: true + type: string + name: + required: true + type: string + +jobs: + test: + runs-on: [ "ubuntu-latest" ] + container: + image: ${{ inputs.image }} + options: --user root + steps: + - name: Create directories + run: | + sudo mkdir -p ${GITHUB_WORKSPACE} + + - name: Check out source code + uses: actions/checkout@v4 + with: + path: src + + - name: Set variables on ARM64 + if: runner.arch == 'ARM64' + run: echo "HYPERSCAN_ALTROOT=-DHYPERSCAN_ROOT_DIR=/vectorscan" >> "$GITHUB_ENV" + + - name: Run cmake + run: | + mkdir ${GITHUB_WORKSPACE}/build + cd ${GITHUB_WORKSPACE}/build + cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install -DCMAKE_RULE_MESSAGES=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_COVERAGE=ON -DENABLE_LIBUNWIND=ON -DENABLE_LUAJIT=ON -DLUA_ROOT=/luajit-build -DENABLE_HYPERSCAN=ON ${{ env.HYPERSCAN_ALTROOT }} ${GITHUB_WORKSPACE}/src + + - name: Build rspamd + run: | + cd ${GITHUB_WORKSPACE}/build + ncpu=$(getconf _NPROCESSORS_ONLN) + make -j $ncpu install + make -j $ncpu rspamd-test + make -j $ncpu rspamd-test-cxx + + - name: Run unit tests + if: "!(inputs.name == 'ubuntu-ci' && runner.arch == 'ARM64')" + run: | + cd ${GITHUB_WORKSPACE}/build + make test |