Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into libgit2-httpparser
Browse files Browse the repository at this point in the history
  • Loading branch information
ethomson committed Apr 22, 2024
2 parents 80d78a7 + 93c9444 commit 44cced9
Show file tree
Hide file tree
Showing 134 changed files with 4,257 additions and 2,082 deletions.
1 change: 1 addition & 0 deletions .github/actions/run-build/action.yml
Expand Up @@ -40,6 +40,7 @@ runs:
-e PKG_CONFIG_PATH \
-e SKIP_NEGOTIATE_TESTS \
-e SKIP_SSH_TESTS \
-e SKIP_PUSHOPTIONS_TESTS \
-e TSAN_OPTIONS \
-e UBSAN_OPTIONS \
${{ inputs.container-version }} \
Expand Down
3 changes: 3 additions & 0 deletions .github/release.yml
Expand Up @@ -27,6 +27,9 @@ changelog:
- title: Git compatibility fixes
labels:
- git compatibility
- title: Dependency updates
labels:
- dependency
- title: Other changes
labels:
- '*'
10 changes: 5 additions & 5 deletions .github/workflows/benchmark.yml
Expand Up @@ -54,7 +54,7 @@ jobs:
runs-on: ${{ matrix.platform.os }}
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
fetch-depth: 0
Expand All @@ -79,7 +79,7 @@ jobs:
../source/tests/benchmarks/benchmark.sh --baseline-cli "git" --cli "${GIT2_CLI}" --name libgit2 --json benchmarks.json --zip benchmarks.zip
shell: bash
- name: Upload results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: benchmark-${{ matrix.platform.id }}
path: benchmark
Expand All @@ -89,18 +89,18 @@ jobs:
publish:
name: Publish results
needs: [ build ]
if: always()
if: ${{ always() && github.repository == 'libgit2/libgit2' }}
runs-on: ubuntu-latest
steps:
- name: Check out benchmark repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: libgit2/benchmarks
path: site
fetch-depth: 0
ssh-key: ${{ secrets.BENCHMARKS_PUBLISH_KEY }}
- name: Download test results
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- name: Publish API
run: |
# Move today's benchmark run into the right place
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-containers.yml
Expand Up @@ -45,7 +45,7 @@ jobs:
name: "Create container: ${{ matrix.container.name }}"
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
fetch-depth: 0
Expand Down
118 changes: 118 additions & 0 deletions .github/workflows/experimental.yml
@@ -0,0 +1,118 @@
# Validation builds for experimental features; these shouldn't be
# required for pull request approval.
name: Experimental Features

on:
push:
branches: [ main, maint/* ]
pull_request:
branches: [ main, maint/* ]
workflow_dispatch:

env:
docker-registry: ghcr.io
docker-config-path: ci/docker

permissions:
contents: write
packages: write

jobs:
# Run our CI/CD builds. We build a matrix with the various build targets
# and their details. Then we build either in a docker container (Linux)
# or on the actual hosts (macOS, Windows).
build:
strategy:
matrix:
platform:
# All builds: experimental SHA256 support
- name: "Linux (SHA256, Xenial, Clang, OpenSSL)"
id: linux-sha256
os: ubuntu-latest
container:
name: xenial
env:
CC: clang
CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON -DEXPERIMENTAL_SHA256=ON
- name: "macOS (SHA256)"
id: macos-sha256
os: macos-12
setup-script: osx
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON
CMAKE_GENERATOR: Ninja
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
- name: "Windows (SHA256, amd64, Visual Studio)"
id: windows-sha256
os: windows-2019
env:
ARCH: amd64
CMAKE_GENERATOR: Visual Studio 16 2019
CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DEXPERIMENTAL_SHA256=ON
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
fail-fast: false
env: ${{ matrix.platform.env }}
runs-on: ${{ matrix.platform.os }}
name: "Build: ${{ matrix.platform.name }}"
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
path: source
fetch-depth: 0
- name: Set up build environment
run: source/ci/setup-${{ matrix.platform.setup-script }}-build.sh
shell: bash
if: matrix.platform.setup-script != ''
- name: Setup QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
if: matrix.platform.container.qemu == true
- name: Set up container
uses: ./source/.github/actions/download-or-build-container
with:
registry: ${{ env.docker-registry }}
config-path: ${{ env.docker-config-path }}
container: ${{ matrix.platform.container.name }}
github_token: ${{ secrets.github_token }}
dockerfile: ${{ matrix.platform.container.dockerfile }}
if: matrix.platform.container.name != ''
- name: Prepare build
run: mkdir build
- name: Build
uses: ./source/.github/actions/run-build
with:
command: cd ${BUILD_WORKSPACE:-.}/build && ../source/ci/build.sh
container: ${{ matrix.platform.container.name }}
container-version: ${{ env.docker-registry-container-sha }}
shell: ${{ matrix.platform.shell }}
- name: Test
uses: ./source/.github/actions/run-build
with:
command: cd ${BUILD_WORKSPACE:-.}/build && ../source/ci/test.sh
container: ${{ matrix.platform.container.name }}
container-version: ${{ env.docker-registry-container-sha }}
shell: ${{ matrix.platform.shell }}
- name: Upload test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-${{ matrix.platform.id }}
path: build/results_*.xml

test_results:
name: Test results
needs: [ build ]
if: always()
runs-on: ubuntu-latest
steps:
- name: Download test results
uses: actions/download-artifact@v3
- name: Generate test summary
uses: test-summary/action@v2
with:
paths: 'test-results-*/*.xml'
49 changes: 11 additions & 38 deletions .github/workflows/main.yml
Expand Up @@ -65,14 +65,14 @@ jobs:
- name: "macOS"
id: macos
os: macos-12
setup-script: osx
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON
CMAKE_GENERATOR: Ninja
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
setup-script: osx
- name: "Windows (amd64, Visual Studio, Schannel)"
id: windows-amd64-vs
os: windows-2019
Expand Down Expand Up @@ -125,6 +125,8 @@ jobs:
# All builds: sanitizers
- name: "Sanitizer (Memory)"
id: sanitizer-memory
os: ubuntu-latest
setup-script: sanitizer
container:
name: noble
env:
Expand All @@ -136,9 +138,10 @@ jobs:
SKIP_NEGOTIATE_TESTS: true
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
UBSAN_OPTIONS: print_stacktrace=1
os: ubuntu-latest
- name: "Sanitizer (Address)"
id: sanitizer-address
os: ubuntu-latest
setup-script: sanitizer
container:
name: noble
env:
Expand All @@ -150,10 +153,10 @@ jobs:
SKIP_NEGOTIATE_TESTS: true
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
UBSAN_OPTIONS: print_stacktrace=1
os: ubuntu-latest
- name: "Sanitizer (UndefinedBehavior)"
id: sanitizer-ub
os: ubuntu-latest
setup-script: sanitizer
container:
name: noble
env:
Expand All @@ -168,6 +171,7 @@ jobs:
- name: "Sanitizer (Thread)"
id: sanitizer-thread
os: ubuntu-latest
setup-script: sanitizer
container:
name: noble
env:
Expand All @@ -180,44 +184,13 @@ jobs:
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
UBSAN_OPTIONS: print_stacktrace=1
TSAN_OPTIONS: suppressions=/home/libgit2/source/script/thread-sanitizer.supp second_deadlock_stack=1

# All builds: experimental SHA256 support
- name: "Linux (SHA256, Xenial, Clang, OpenSSL)"
id: xenial-clang-openssl
os: ubuntu-latest
container:
name: xenial
env:
CC: clang
CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON -DEXPERIMENTAL_SHA256=ON
- name: "macOS (SHA256)"
id: macos
os: macos-12
setup-script: osx
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON
CMAKE_GENERATOR: Ninja
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
- name: "Windows (SHA256, amd64, Visual Studio)"
id: windows-amd64-vs
os: windows-2019
env:
ARCH: amd64
CMAKE_GENERATOR: Visual Studio 16 2019
CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DEXPERIMENTAL_SHA256=ON
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
fail-fast: false
env: ${{ matrix.platform.env }}
runs-on: ${{ matrix.platform.os }}
name: "Build: ${{ matrix.platform.name }}"
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
fetch-depth: 0
Expand Down Expand Up @@ -254,7 +227,7 @@ jobs:
container-version: ${{ env.docker-registry-container-sha }}
shell: ${{ matrix.platform.shell }}
- name: Upload test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-${{ matrix.platform.id }}
Expand Down Expand Up @@ -285,7 +258,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
fetch-depth: 0
Expand All @@ -312,7 +285,7 @@ jobs:
cm doc api.docurium
git checkout gh-pages
zip --exclude .git/\* --exclude .gitignore --exclude .gitattributes -r api-documentation.zip .
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload artifact
with:
name: api-documentation
Expand Down

0 comments on commit 44cced9

Please sign in to comment.