diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-09-10 16:05:04 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-09-12 11:18:14 +0200 |
| commit | 3d582dd8856bd9c8e3243407b61690263ed2ee48 (patch) | |
| tree | c3045fe7f15163a0e04b72ce66d64afc88cfc7de /.github/workflows | |
| parent | 0c1962669858b1d67a6b8851ae0e8c4123a1c282 (diff) | |
Add github action workflows CI
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/abi_check.yml | 24 | ||||
| -rw-r--r-- | .github/workflows/build.yml | 189 | ||||
| -rw-r--r-- | .github/workflows/code_style.yml | 26 |
3 files changed, 239 insertions, 0 deletions
diff --git a/.github/workflows/abi_check.yml b/.github/workflows/abi_check.yml new file mode 100644 index 00000000..bb0162dc --- /dev/null +++ b/.github/workflows/abi_check.yml @@ -0,0 +1,24 @@ +name: ABI check + +on: [push, pull_request, workflow_dispatch] + +jobs: + abi_check: + 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@v2 + + - name: Install Requirements + run: | + sudo apt update + sudo apt install -y gcc g++ libelf-dev elfutils texinfo exuberant-ctags libtiff-dev libwebp-dev libzstd-dev + + - name: Build + run: | + ./tools/travis-ci/install.sh + ./tools/travis-ci/run.sh + ./tools/travis-ci/abi-check.sh + env: + OPJ_CI_ABI_CHECK: 1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..be2c2325 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,189 @@ +name: Build + +on: [push, pull_request, workflow_dispatch] + +jobs: + regular: + 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@v2 + + - name: Install Requirements + run: | + sudo apt update + sudo apt install -y gcc g++ + + - 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_PERF_TESTS: 1 + OPJ_CI_BUILD_FUZZERS: 1 + OPJ_CI_INCLUDE_IF_DEPLOY: 1 + OPJ_NONCOMMERCIAL: 1 + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: build/openjpeg-*.tar.gz + + asan: + 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@v2 + + - name: Install Requirements + run: | + sudo apt update + sudo apt install -y gcc g++ + + - 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: Debug + OPJ_CI_ASAN: 1 + OPJ_NONCOMMERCIAL: 1 + + clang_32bit: + 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@v2 + + - name: Install Requirements + run: | + sudo apt update + sudo apt install -y clang gcc-multilib + + - name: Build and run tests + run: | + ./tools/travis-ci/install.sh + ./tools/travis-ci/run.sh + env: + OPJ_CI_CC: clang + OPJ_CI_CXX: clang++ + OPJ_CI_INSTRUCTION_SETS: "-mavx2" + OPJ_CI_BUILD_CONFIGURATION: Release + OPJ_CI_ARCH: i386 + OPJ_NUM_THREADS: 2 + OPJ_NONCOMMERCIAL: 1 + + mingw_64: + 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@v2 + + - name: Install Requirements + run: | + sudo apt update + sudo apt install -y gcc-mingw-w64-base binutils-mingw-w64-x86-64 gcc-mingw-w64-x86-64 gcc-mingw-w64 g++-mingw-w64-x86-64 + + - name: Build and run tests + run: | + ./tools/travis-ci/install.sh + ./tools/travis-ci/run.sh + env: + OPJ_CI_CC: x86_64-w64-mingw32-gcc + OPJ_CI_CXX: x86_64-w64-mingw32-g++ + OPJ_CI_ARCH: x86_64 + OPJ_CI_BUILD_CONFIGURATION: Release + OPJ_NONCOMMERCIAL: 1 + + macos: + runs-on: macos-latest + if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" + steps: + - name: Checkout + uses: actions/checkout@v2 + + - 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_INCLUDE_IF_DEPLOY: 1 + #OPJ_NONCOMMERCIAL: 1 + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: build/openjpeg-*.zip + + windows_build: + runs-on: windows-latest + if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" + + strategy: + matrix: + include: + - VS_VER: 2019 + OPJ_CI_ARCH: x64 + OPJ_CI_INCLUDE_IF_DEPLOY: 1 + - VS_VER: 2019 + OPJ_CI_ARCH: x86 + OPJ_CI_INCLUDE_IF_DEPLOY: 1 + - VS_VER: 2019 + OPJ_CI_ARCH: x64 + # We do have specific failures noted in tools/travis-ci/knownfailures-windows-vs2015-x64-avx2-Release-3rdP.txt + # not sure why that happens + OPJ_CI_INSTRUCTION_SETS: "/arch:AVX2" + + env: + VS_VER: ${{ matrix.VS_VER }} + OPJ_CI_ARCH: ${{ matrix.OPJ_CI_ARCH }} + OPJ_CI_INCLUDE_IF_DEPLOY: ${{ matrix.OPJ_CI_INCLUDE_IF_DEPLOY }} + OPJ_CI_INSTRUCTION_SETS: ${{ matrix.OPJ_CI_INSTRUCTION_SETS }} + #OPJ_NONCOMMERCIAL: 1 + + steps: + + - name: Setup git + run: | + git config --global core.autocrlf false + git config --system core.longpaths true + + - name: Checkout + uses: actions/checkout@v2 + + - name: Set compiler environment + shell: cmd + run: | + if "%VS_VER%" == "2019" CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=%OPJ_CI_ARCH% + echo PATH=%PATH%>> %GITHUB_ENV% + echo INCLUDE=%INCLUDE%>> %GITHUB_ENV% + echo LIB=%LIB%>> %GITHUB_ENV% + echo LIBPATH=%LIBPATH%>> %GITHUB_ENV% + + - name: Install wget + shell: cmd + run: | + choco install wget --no-progress + + - name: Build and run tests + run: | + ./tools/travis-ci/install.sh + ./tools/travis-ci/run.sh + shell: bash + + - name: Release + uses: softprops/action-gh-release@v1 + if: ${{startsWith(github.ref, 'refs/tags/') && env.OPJ_CI_INCLUDE_IF_DEPLOY == 1}} + with: + files: build/openjpeg-*.zip diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml new file mode 100644 index 00000000..bd09e5e8 --- /dev/null +++ b/.github/workflows/code_style.yml @@ -0,0 +1,26 @@ +name: Code Style + +on: [push, pull_request, workflow_dispatch] + +jobs: + code_style: + 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@v2 + with: + fetch-depth: 0 + + - name: Install Requirements + run: | + sudo apt update + sudo apt install -y gcc g++ flip + + - name: Run check + run: | + ./tools/travis-ci/install.sh + ./tools/travis-ci/run.sh + env: + OPJ_CI_CHECK_STYLE: 1 + OPJ_CI_SKIP_TESTS: 1 |
