Skip to content

Commit

Permalink
Merge pull request #2919 from kevinbackhouse/backport-workflows
Browse files Browse the repository at this point in the history
Backport workflow changes to 0.28.x branch
  • Loading branch information
kevinbackhouse authored Feb 13, 2024
2 parents 355afea + 981926b commit 48c20f4
Show file tree
Hide file tree
Showing 17 changed files with 117 additions and 248 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ concurrency:

on:
push:
branches: [0.27-maintenance, main]
branches: [0.28.x, main]
paths-ignore:
- "*.md"
pull_request:
# The branches below must be a subset of the branches above
branches: [0.27-maintenance, main]
branches: [0.28.x, main]
paths-ignore:
- "*.md"
workflow_dispatch:
Expand All @@ -29,23 +29,22 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
language: [ 'cpp', 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libexpat1-dev zlib1g-dev libbrotli-dev libinih-dev
sudo eatmydata apt-get -y install libexpat1-dev zlib1g-dev libbrotli-dev libinih-dev
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: .github/codeql/codeql-config.yml
Expand All @@ -57,7 +56,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -71,4 +70,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
22 changes: 0 additions & 22 deletions .github/workflows/codesee-arch-diagram.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/nightly_Linux_distributions.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/on_PR_linux_fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: install dependencies
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo ./ci/install_dependencies.sh
sudo apt-get install ninja-build
- name: build and compile
- name: Build
env:
CC: clang
CXX: clang++
run: |
cmake --preset linux-sanitizers -S . -B build -DCMAKE_BUILD_TYPE=Release -DEXIV2_BUILD_FUZZ_TESTS=ON -DEXIV2_BUILD_UNIT_TESTS=OFF
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/on_PR_linux_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
shared_libraries: [ON, OFF]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install dependencies
- name: Install dependencies
run: |
sudo apt install -y tree
python3 -m pip install conan==1.59.0 ninja
sudo apt install -y tree ninja-build
python3 -m pip install conan==1.*
- name: Conan common config
run: |
Expand Down
31 changes: 16 additions & 15 deletions .github/workflows/on_PR_linux_special_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
# Trying to deal with warning: -> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0

- name: install dependencies
- name: Install dependencies
run: |
sudo apt-get install -y libxml2-dev libxslt-dev python3-dev
python3 -m pip install conan==1.59.0 gcovr ninja
sudo eatmydata apt-get -y install libxml2-dev libxslt-dev python3-dev ninja-build gcovr
python3 -m pip install conan==1.*
- name: Conan common config
run: |
Expand Down Expand Up @@ -64,12 +64,12 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install dependencies
- name: Install dependencies
run: |
sudo apt install -y valgrind
python3 -m pip install conan==1.59.0 ninja
sudo apt install -y valgrind ninja-build
python3 -m pip install conan==1.*
- name: Conan common config
run: |
Expand Down Expand Up @@ -99,11 +99,12 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install dependencies
- name: Install dependencies
run: |
python3 -m pip install conan==1.59.0 ninja
sudo apt install -y ninja-build
python3 -m pip install conan==1.*
- name: Conan common config
run: |
Expand Down Expand Up @@ -132,12 +133,12 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install dependencies
- name: Install dependencies
run: |
sudo apt install -y valgrind doxygen graphviz gettext
python3 -m pip install conan==1.59.0 ninja
sudo apt install -y valgrind doxygen graphviz gettext ninja-build
python3 -m pip install conan==1.*
- name: Conan common config
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/on_PR_linux_staticAnalysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
# Trying to deal with warning: -> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0

- name: install dependencies
- name: Install dependencies
run: |
python3 -m pip install conan==1.59.0
python3 -m pip install conan==1.*
sudo add-apt-repository ppa:ubuntu-lxc/daily -y
wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt |sudo apt-key add -
sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.pvs-studio.com/etc/viva64.list
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
pvs-studio-analyzer analyze -l PVS_license.lic -o pvsStudio.log -j4 --disableLicenseExpirationCheck
plog-converter -a GA:1,2 -d V1042 -t fullhtml pvsStudio.log -o pvsReportHtml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: static_analysis
path: build/pvsReportHtml
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/on_PR_mac_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
MacOS:
name: 'MacOS - clang, BuildType:${{matrix.build_type}}, SHARED:${{matrix.shared_libraries}}'
name: 'macOS - XCode - ${{matrix.build_type}} - SHARED:${{matrix.shared_libraries}}'
runs-on: macos-latest

strategy:
Expand All @@ -21,13 +21,11 @@ jobs:
shared_libraries: [ON, OFF]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install dependencies
- name: Install dependencies
run: |
brew install ninja
brew install inih
brew install googletest
brew install ninja inih googletest
- name: Build
run: |
Expand All @@ -41,5 +39,4 @@ jobs:
- name: Test
run: |
cd build
ctest --output-on-failure
ctest --test-dir build --output-on-failure
15 changes: 6 additions & 9 deletions .github/workflows/on_PR_mac_special_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,21 @@ on:

jobs:
MacOS_releaseSanitizers:
name: 'MacOS - Clang - Release+Sanitizers'
name: 'macOS - XCode - Release+Sanitizers'
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install dependencies
- name: Install dependencies
run: |
brew install ninja
brew install inih
brew install googletest
brew install ninja inih googletest
- name: Build
run: |
cmake --preset base_mac -S . -B build -DEXIV2_TEAM_USE_SANITIZERS=ON
cmake --build build --parallel
- name: Tests
- name: Test
run: |
cd build
ctest --output-on-failure
ctest --test-dir build --output-on-failure
18 changes: 9 additions & 9 deletions .github/workflows/on_PR_meson.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
deps: ['forcefallback', 'default']
platform: ['x64', 'x86']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: |
Expand All @@ -79,7 +79,7 @@ jobs:
matrix:
deps: ['forcefallback', 'default']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: |
Expand All @@ -101,12 +101,12 @@ jobs:
strategy:
matrix:
deps: ['enabled', 'disabled']
platform: ['UCRT64', 'CLANG32', 'CLANG64']
platform: ['UCRT64', 'CLANG64']
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: msys2/setup-msys2@v2
with:
Expand All @@ -133,7 +133,7 @@ jobs:
matrix:
deps: ['enabled', 'disabled']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: |
Expand All @@ -146,12 +146,12 @@ jobs:
meson compile -C "${{github.workspace}}/build"
meson test -C "${{github.workspace}}/build"
FreeBSD:
runs-on: macos-latest
runs-on: ubuntu-latest
name: FreeBSD
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: FreeBSD
uses: vmactions/freebsd-vm@v0
uses: vmactions/freebsd-vm@v1
with:
prepare: |
pkg install -y cmake curl ninja meson gettext pkgconf googletest expat inih brotli
Expand All @@ -168,7 +168,7 @@ jobs:
run: |
python3 -m pip install meson ninja
- name: Emscripten
uses: mymindstorm/setup-emsdk@v12
uses: mymindstorm/setup-emsdk@v14
- name: Compile
run: |
meson setup "${{github.workspace}}/build" --cross-file="${{github.workspace}}/em.txt" --wrap-mode=forcefallback -Ddefault_library=static -Dwarning_level=3 -Dcpp_std=c++20 -DunitTests=disabled -Dcurl=disabled
Expand Down
Loading

0 comments on commit 48c20f4

Please sign in to comment.