Skip to content

Commit fb1797d

Browse files
committed
Merge remote-tracking branch 'origin/main' into libgit2-httpparser
2 parents 15a8d87 + 93c9444 commit fb1797d

File tree

134 files changed

+4257
-2082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+4257
-2082
lines changed

.github/actions/run-build/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ runs:
4040
-e PKG_CONFIG_PATH \
4141
-e SKIP_NEGOTIATE_TESTS \
4242
-e SKIP_SSH_TESTS \
43+
-e SKIP_PUSHOPTIONS_TESTS \
4344
-e TSAN_OPTIONS \
4445
-e UBSAN_OPTIONS \
4546
${{ inputs.container-version }} \

.github/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ changelog:
2727
- title: Git compatibility fixes
2828
labels:
2929
- git compatibility
30+
- title: Dependency updates
31+
labels:
32+
- dependency
3033
- title: Other changes
3134
labels:
3235
- '*'

.github/workflows/benchmark.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
runs-on: ${{ matrix.platform.os }}
5555
steps:
5656
- name: Check out repository
57-
uses: actions/checkout@v3
57+
uses: actions/checkout@v4
5858
with:
5959
path: source
6060
fetch-depth: 0
@@ -79,7 +79,7 @@ jobs:
7979
../source/tests/benchmarks/benchmark.sh --baseline-cli "git" --cli "${GIT2_CLI}" --name libgit2 --json benchmarks.json --zip benchmarks.zip
8080
shell: bash
8181
- name: Upload results
82-
uses: actions/upload-artifact@v3
82+
uses: actions/upload-artifact@v4
8383
with:
8484
name: benchmark-${{ matrix.platform.id }}
8585
path: benchmark
@@ -89,18 +89,18 @@ jobs:
8989
publish:
9090
name: Publish results
9191
needs: [ build ]
92-
if: always()
92+
if: ${{ always() && github.repository == 'libgit2/libgit2' }}
9393
runs-on: ubuntu-latest
9494
steps:
9595
- name: Check out benchmark repository
96-
uses: actions/checkout@v3
96+
uses: actions/checkout@v4
9797
with:
9898
repository: libgit2/benchmarks
9999
path: site
100100
fetch-depth: 0
101101
ssh-key: ${{ secrets.BENCHMARKS_PUBLISH_KEY }}
102102
- name: Download test results
103-
uses: actions/download-artifact@v3
103+
uses: actions/download-artifact@v4
104104
- name: Publish API
105105
run: |
106106
# Move today's benchmark run into the right place

.github/workflows/build-containers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
name: "Create container: ${{ matrix.container.name }}"
4646
steps:
4747
- name: Check out repository
48-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
4949
with:
5050
path: source
5151
fetch-depth: 0

.github/workflows/experimental.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Validation builds for experimental features; these shouldn't be
2+
# required for pull request approval.
3+
name: Experimental Features
4+
5+
on:
6+
push:
7+
branches: [ main, maint/* ]
8+
pull_request:
9+
branches: [ main, maint/* ]
10+
workflow_dispatch:
11+
12+
env:
13+
docker-registry: ghcr.io
14+
docker-config-path: ci/docker
15+
16+
permissions:
17+
contents: write
18+
packages: write
19+
20+
jobs:
21+
# Run our CI/CD builds. We build a matrix with the various build targets
22+
# and their details. Then we build either in a docker container (Linux)
23+
# or on the actual hosts (macOS, Windows).
24+
build:
25+
strategy:
26+
matrix:
27+
platform:
28+
# All builds: experimental SHA256 support
29+
- name: "Linux (SHA256, Xenial, Clang, OpenSSL)"
30+
id: linux-sha256
31+
os: ubuntu-latest
32+
container:
33+
name: xenial
34+
env:
35+
CC: clang
36+
CMAKE_GENERATOR: Ninja
37+
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON -DEXPERIMENTAL_SHA256=ON
38+
- name: "macOS (SHA256)"
39+
id: macos-sha256
40+
os: macos-12
41+
setup-script: osx
42+
env:
43+
CC: clang
44+
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON
45+
CMAKE_GENERATOR: Ninja
46+
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
47+
SKIP_SSH_TESTS: true
48+
SKIP_NEGOTIATE_TESTS: true
49+
- name: "Windows (SHA256, amd64, Visual Studio)"
50+
id: windows-sha256
51+
os: windows-2019
52+
env:
53+
ARCH: amd64
54+
CMAKE_GENERATOR: Visual Studio 16 2019
55+
CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DEXPERIMENTAL_SHA256=ON
56+
SKIP_SSH_TESTS: true
57+
SKIP_NEGOTIATE_TESTS: true
58+
fail-fast: false
59+
env: ${{ matrix.platform.env }}
60+
runs-on: ${{ matrix.platform.os }}
61+
name: "Build: ${{ matrix.platform.name }}"
62+
steps:
63+
- name: Check out repository
64+
uses: actions/checkout@v4
65+
with:
66+
path: source
67+
fetch-depth: 0
68+
- name: Set up build environment
69+
run: source/ci/setup-${{ matrix.platform.setup-script }}-build.sh
70+
shell: bash
71+
if: matrix.platform.setup-script != ''
72+
- name: Setup QEMU
73+
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
74+
if: matrix.platform.container.qemu == true
75+
- name: Set up container
76+
uses: ./source/.github/actions/download-or-build-container
77+
with:
78+
registry: ${{ env.docker-registry }}
79+
config-path: ${{ env.docker-config-path }}
80+
container: ${{ matrix.platform.container.name }}
81+
github_token: ${{ secrets.github_token }}
82+
dockerfile: ${{ matrix.platform.container.dockerfile }}
83+
if: matrix.platform.container.name != ''
84+
- name: Prepare build
85+
run: mkdir build
86+
- name: Build
87+
uses: ./source/.github/actions/run-build
88+
with:
89+
command: cd ${BUILD_WORKSPACE:-.}/build && ../source/ci/build.sh
90+
container: ${{ matrix.platform.container.name }}
91+
container-version: ${{ env.docker-registry-container-sha }}
92+
shell: ${{ matrix.platform.shell }}
93+
- name: Test
94+
uses: ./source/.github/actions/run-build
95+
with:
96+
command: cd ${BUILD_WORKSPACE:-.}/build && ../source/ci/test.sh
97+
container: ${{ matrix.platform.container.name }}
98+
container-version: ${{ env.docker-registry-container-sha }}
99+
shell: ${{ matrix.platform.shell }}
100+
- name: Upload test results
101+
uses: actions/upload-artifact@v4
102+
if: success() || failure()
103+
with:
104+
name: test-results-${{ matrix.platform.id }}
105+
path: build/results_*.xml
106+
107+
test_results:
108+
name: Test results
109+
needs: [ build ]
110+
if: always()
111+
runs-on: ubuntu-latest
112+
steps:
113+
- name: Download test results
114+
uses: actions/download-artifact@v3
115+
- name: Generate test summary
116+
uses: test-summary/action@v2
117+
with:
118+
paths: 'test-results-*/*.xml'

.github/workflows/main.yml

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ jobs:
6565
- name: "macOS"
6666
id: macos
6767
os: macos-12
68+
setup-script: osx
6869
env:
6970
CC: clang
7071
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON
7172
CMAKE_GENERATOR: Ninja
7273
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
7374
SKIP_SSH_TESTS: true
7475
SKIP_NEGOTIATE_TESTS: true
75-
setup-script: osx
7676
- name: "Windows (amd64, Visual Studio, Schannel)"
7777
id: windows-amd64-vs
7878
os: windows-2019
@@ -125,6 +125,8 @@ jobs:
125125
# All builds: sanitizers
126126
- name: "Sanitizer (Memory)"
127127
id: sanitizer-memory
128+
os: ubuntu-latest
129+
setup-script: sanitizer
128130
container:
129131
name: noble
130132
env:
@@ -136,9 +138,10 @@ jobs:
136138
SKIP_NEGOTIATE_TESTS: true
137139
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
138140
UBSAN_OPTIONS: print_stacktrace=1
139-
os: ubuntu-latest
140141
- name: "Sanitizer (Address)"
141142
id: sanitizer-address
143+
os: ubuntu-latest
144+
setup-script: sanitizer
142145
container:
143146
name: noble
144147
env:
@@ -150,10 +153,10 @@ jobs:
150153
SKIP_NEGOTIATE_TESTS: true
151154
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
152155
UBSAN_OPTIONS: print_stacktrace=1
153-
os: ubuntu-latest
154156
- name: "Sanitizer (UndefinedBehavior)"
155157
id: sanitizer-ub
156158
os: ubuntu-latest
159+
setup-script: sanitizer
157160
container:
158161
name: noble
159162
env:
@@ -168,6 +171,7 @@ jobs:
168171
- name: "Sanitizer (Thread)"
169172
id: sanitizer-thread
170173
os: ubuntu-latest
174+
setup-script: sanitizer
171175
container:
172176
name: noble
173177
env:
@@ -180,44 +184,13 @@ jobs:
180184
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
181185
UBSAN_OPTIONS: print_stacktrace=1
182186
TSAN_OPTIONS: suppressions=/home/libgit2/source/script/thread-sanitizer.supp second_deadlock_stack=1
183-
184-
# All builds: experimental SHA256 support
185-
- name: "Linux (SHA256, Xenial, Clang, OpenSSL)"
186-
id: xenial-clang-openssl
187-
os: ubuntu-latest
188-
container:
189-
name: xenial
190-
env:
191-
CC: clang
192-
CMAKE_GENERATOR: Ninja
193-
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON -DEXPERIMENTAL_SHA256=ON
194-
- name: "macOS (SHA256)"
195-
id: macos
196-
os: macos-12
197-
setup-script: osx
198-
env:
199-
CC: clang
200-
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON
201-
CMAKE_GENERATOR: Ninja
202-
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
203-
SKIP_SSH_TESTS: true
204-
SKIP_NEGOTIATE_TESTS: true
205-
- name: "Windows (SHA256, amd64, Visual Studio)"
206-
id: windows-amd64-vs
207-
os: windows-2019
208-
env:
209-
ARCH: amd64
210-
CMAKE_GENERATOR: Visual Studio 16 2019
211-
CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DEXPERIMENTAL_SHA256=ON
212-
SKIP_SSH_TESTS: true
213-
SKIP_NEGOTIATE_TESTS: true
214187
fail-fast: false
215188
env: ${{ matrix.platform.env }}
216189
runs-on: ${{ matrix.platform.os }}
217190
name: "Build: ${{ matrix.platform.name }}"
218191
steps:
219192
- name: Check out repository
220-
uses: actions/checkout@v3
193+
uses: actions/checkout@v4
221194
with:
222195
path: source
223196
fetch-depth: 0
@@ -254,7 +227,7 @@ jobs:
254227
container-version: ${{ env.docker-registry-container-sha }}
255228
shell: ${{ matrix.platform.shell }}
256229
- name: Upload test results
257-
uses: actions/upload-artifact@v3
230+
uses: actions/upload-artifact@v4
258231
if: success() || failure()
259232
with:
260233
name: test-results-${{ matrix.platform.id }}
@@ -285,7 +258,7 @@ jobs:
285258
runs-on: ubuntu-latest
286259
steps:
287260
- name: Check out repository
288-
uses: actions/checkout@v3
261+
uses: actions/checkout@v4
289262
with:
290263
path: source
291264
fetch-depth: 0
@@ -312,7 +285,7 @@ jobs:
312285
cm doc api.docurium
313286
git checkout gh-pages
314287
zip --exclude .git/\* --exclude .gitignore --exclude .gitattributes -r api-documentation.zip .
315-
- uses: actions/upload-artifact@v3
288+
- uses: actions/upload-artifact@v4
316289
name: Upload artifact
317290
with:
318291
name: api-documentation

0 commit comments

Comments
 (0)