From b355c9fc7f2d475de2bf4b12f8b9af84e64802c7 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 5 Sep 2024 19:01:43 +0200 Subject: [PATCH] CI: add a -march=native build --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64767fe10..c7ab6d595 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,33 @@ jobs: with: files: build/openjpeg-*.tar.gz + arch_native: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Requirements + run: | + sudo apt update + sudo apt install -y gcc g++ libtiff-dev libwebp-dev libzstd-dev + + - name: Show architecture flags + run: | + cat /proc/cpuinfo | grep flags | head -n 1 + + - name: Build and run tests + run: | + ./tools/travis-ci/install.sh + ./tools/travis-ci/run.sh + env: + OPJ_CI_ARCH: x86_64 + OPJ_CI_BUILD_CONFIGURATION: Release + OPJ_CI_INSTRUCTION_SETS: "-march=native" + OPJ_NUM_THREADS: 2 + OPJ_NONCOMMERCIAL: 1 + asan: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"