Fix CI scripts.

This commit is contained in:
Michael R Sweet 2023-12-03 20:20:23 -05:00
parent 43000ff01f
commit a195c023af
No known key found for this signature in database
GPG Key ID: BE67C75EC81F3244
3 changed files with 37 additions and 25 deletions

View File

@ -9,23 +9,26 @@ on:
jobs: jobs:
build-linux: build-linux:
runs-on: ubuntu-20.04 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - name: Checkout PDFio sources
- name: update build environment uses: actions/checkout@v4
- name: Update Build Environment
run: sudo apt-get update --fix-missing -y run: sudo apt-get update --fix-missing -y
- name: install prerequisites - name: Install Prerequisites
run: sudo apt-get install -y cppcheck zlib1g-dev run: sudo apt-get install -y cppcheck zlib1g-dev
- name: make - name: Configure PDFio
run: ./configure --enable-debug --enable-sanitizer --enable-maintainer
- name: Build PDFio
run: make "COMMONFLAGS=-g -fsanitize=address" run: make "COMMONFLAGS=-g -fsanitize=address"
- name: test - name: Test PDFio
env: env:
ASAN_OPTIONS: leak_check_at_exit=false ASAN_OPTIONS: leak_check_at_exit=false
run: make test run: make test
- name: clang static analyzer - name: Run Clang Static Analyzer
run: make CC=clang "GHA_ERROR=::error::" clang run: make CC=clang "GHA_ERROR=::error::" clang
- name: cppcheck - name: Run cppcheck
run: make "GHA_ERROR=::error::" cppcheck run: make "GHA_ERROR=::error::" cppcheck
build-macos: build-macos:
@ -33,12 +36,15 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v2 - name: Checkout PDFio sources
- name: make uses: actions/checkout@v4
- name: Configure PDFio
run: ./configure --enable-debug --enable-sanitizer --enable-maintainer
- name: Build PDFio
run: make "COMMONFLAGS=-g -fsanitize=address" run: make "COMMONFLAGS=-g -fsanitize=address"
- name: test - name: Test PDFio
run: make test run: make test
- name: clang static analyzer - name: Run Clang Static Analyzer
run: make CC=clang "GHA_ERROR=::error::" clang run: make CC=clang "GHA_ERROR=::error::" clang
build-windows: build-windows:
@ -46,10 +52,11 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v2 - name: Checkout PDFio sources
- name: setup-msbuild uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2 uses: microsoft/setup-msbuild@v1.0.2
- name: nuget restore - name: Nuget Restore
run: nuget restore pdfio.sln run: nuget restore pdfio.sln
- name: msbuild - name: Build PDFio
run: msbuild pdfio.sln run: msbuild pdfio.sln

View File

@ -23,15 +23,15 @@ jobs:
language: [ cpp ] language: [ cpp ]
steps: steps:
- name: Checkout - name: Checkout PDFio sources
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
- name: Update build environment - name: Update Build Environment
run: sudo apt-get update --fix-missing -y run: sudo apt-get update --fix-missing -y
- name: Install prerequisites - name: Install Prerequisites
run: sudo apt-get install -y zlib1g-dev run: sudo apt-get install -y zlib1g-dev
- name: Initialize CodeQL - name: Initialize CodeQL

View File

@ -7,10 +7,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: Coverity environment: Coverity
steps: steps:
- uses: actions/checkout@v2 - name: Checkout PDFio sources
- name: update build environment uses: actions/checkout@v4
- name: Update Build Environment
run: sudo apt-get update --fix-missing -y run: sudo apt-get update --fix-missing -y
- name: install prerequisites - name: Install Prerequisites
run: sudo apt-get install -y zlib1g-dev run: sudo apt-get install -y zlib1g-dev
- name: Download Coverity Build Tool - name: Download Coverity Build Tool
run: | run: |
@ -20,11 +21,15 @@ jobs:
env: env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: Build with cov-build - name: Configure PDFio
run: ./configure --enable-debug --enable-maintainer
- name: Build PDFio with cov-build
run: | run: |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cov-build --dir cov-int make cov-build --dir cov-int make
- name: Submit the result to Coverity Scan
- name: Submit the Result to Coverity Scan
run: | run: |
tar czvf cov.tgz cov-int tar czvf cov.tgz cov-int
curl \ curl \