diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-09-23 18:42:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 18:42:54 +0100 |
commit | 7a22dafeca71f861e78327edd6a9342e749fe175 (patch) | |
tree | 18a281f1f3ab06346a2acf66dacab9147cc81fd1 /.github/workflows | |
parent | 1195a120f6a09f9b217d8743c75ea2a0b8c25d35 (diff) | |
download | rspamd-7a22dafeca71f861e78327edd6a9342e749fe175.tar.gz rspamd-7a22dafeca71f861e78327edd6a9342e749fe175.zip |
Create ci_rspamd_build.yml
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ci_rspamd_build.yml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/ci_rspamd_build.yml b/.github/workflows/ci_rspamd_build.yml new file mode 100644 index 000000000..cdada5e8a --- /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_HYPERSCAN=ON ${{ env.HYPERSCAN_ALTROOT }} -GNinja ${GITHUB_WORKSPACE}/src + + - name: Build rspamd + run: | + cd ${GITHUB_WORKSPACE}/build + ncpu=$(getconf _NPROCESSORS_ONLN) + ninja -j $ncpu install + ninja -j $ncpu rspamd-test + ninja -j $ncpu rspamd-test-cxx + + - name: Run unit tests + if: "!(inputs.name == 'ubuntu-ci' && runner.arch == 'ARM64')" + run: | + cd ${GITHUB_WORKSPACE}/build + ninja test |