8000 Merge pull request #6895 from libgit2/ethomson/ci · libgit2/libgit2@5efafa9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5efafa9

Browse files
authored
Merge pull request #6895 from libgit2/ethomson/ci
CI updates
2 parents 9ddd72f + 54e7701 commit 5efafa9

File tree

8 files changed

+47
-42
lines changed

8 files changed

+47
-42
lines changed

.github/workflows/benchmark.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,31 @@ jobs:
2323
matrix:
2424
platform:
2525
- name: "Linux (clang, OpenSSL)"
26+
id: linux
27+
os: ubuntu-latest
28+
setup-script: ubuntu
2629
env:
2730
CC: clang
2831
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_GSSAPI=ON -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI=ON -DCMAKE_BUILD_TYPE=Release
2932
CMAKE_BUILD_OPTIONS: --config Release
30-
id: linux
31-
os: ubuntu-latest
32-
setup-script: ubuntu
3333
- name: "macOS"
34-
os: macos-12
34+
id: macos
35+
os: macos-latest
36+
setup-script: osx
3537
env:
3638
CC: clang
3739
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_GSSAPI=ON -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI=ON -DCMAKE_BUILD_TYPE=Release
3840
CMAKE_BUILD_OPTIONS: --config Release
3941
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
40-
id: macos
41-
setup-script: osx
4242
- name: "Windows (amd64, Visual Studio)"
43-
os: windows-2019
43+
id: windows
44+
os: windows-2022
45+
setup-script: win32
4446
env:
4547
ARCH: amd64
46-
CMAKE_GENERATOR: Visual Studio 16 2019
48+
CMAKE_GENERATOR: Visual Studio 17 2022
4749
CMAKE_OPTIONS: -A x64 -DDEPRECATE_HARD=ON -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI=ON -DCMAKE_BUILD_TYPE=Release 8000
4850
CMAKE_BUILD_OPTIONS: --config Release
49-
id: windows
50-
setup-script: win32
5151
fail-fast: false
5252
name: "Benchmark ${{ matrix.platform.name }}"
5353
env: ${{ matrix.platform.env }}

.github/workflows/experimental.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON -DEXPERIMENTAL_SHA256=ON
3838
- name: "macOS (SHA256)"
3939
id: macos-sha256
40-
os: macos-12
40+
os: macos-13
4141
setup-script: osx
4242
env:
4343
CC: clang

.github/workflows/main.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=libssh2
6565
- name: "macOS"
6666
id: macos
67-
os: macos-12
67+
os: macos-13
6868
setup-script: osx
6969
env:
7070
CC: clang
@@ -75,31 +75,31 @@ jobs:
7575
SKIP_NEGOTIATE_TESTS: true
7676
- name: "Windows (amd64, Visual Studio, Schannel)"
7777
id: windows-amd64-vs
78-
os: windows-2019
78+
os: windows-2022
7979
setup-script: win32
8080
env:
8181
ARCH: amd64
82-
CMAKE_GENERATOR: Visual Studio 16 2019
82+
CMAKE_GENERATOR: Visual Studio 17 2022
8383
CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DUSE_HTTPS=Schannel -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2
8484
BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin
8585
BUILD_TEMP: D:\Temp
8686
SKIP_SSH_TESTS: true
8787
SKIP_NEGOTIATE_TESTS: true
8888
- name: "Windows (x86, Visual Studio, WinHTTP)"
8989
id: windows-x86-vs
90-
os: windows-2019
90+
os: windows-2022
9191
setup-script: win32
9292
env:
9393
ARCH: x86
94-
CMAKE_GENERATOR: Visual Studio 16 2019
94+
CMAKE_GENERATOR: Visual Studio 17 2022
9595
CMAKE_OPTIONS: -A Win32 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2
9696
BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin
9797
BUILD_TEMP: D:\Temp
9898
SKIP_SSH_TESTS: true
9999
SKIP_NEGOTIATE_TESTS: true
100100
- name: "Windows (amd64, mingw, WinHTTP)"
101101
id: windows-amd64-mingw
102-
os: windows-2019
102+
os: windows-2022
103103
setup-script: mingw
104104
env:
105105
ARCH: amd64
@@ -111,7 +111,7 @@ jobs:
111111
SKIP_NEGOTIATE_TESTS: true
112112
- name: "Windows (x86, mingw, Schannel)"
113113
id: windows-x86-mingw
114-
os: windows-2019
114+
os: windows-2022
115115
setup-script: mingw
116116
env:
117117
ARCH: x86
@@ -240,7 +240,7 @@ jobs:
240240
runs-on: ubuntu-latest
241241
steps:
242242
- name: Download test results
243-
uses: actions/download-artifact@v3
243+
uses: actions/download-artifact@v4
244244
- name: Generate test summary
245245
uses: test-summary/action@v2
246246
with:

.github/workflows/nightly.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=libssh2
6666
- name: "macOS"
6767
id: macos
68-
os: macos-12
68+
os: macos-13
6969
setup-script: osx
7070
env:
7171
CC: clang
@@ -76,7 +76,7 @@ jobs:
7676
SKIP_NEGOTIATE_TESTS: true
7777
- name: "iOS"
7878
id: ios
79-
os: macos-12
79+
os: macos-13
8080
setup-script: ios
8181
env:
8282
CC: clang
@@ -86,31 +86,31 @@ jobs:
8686
SKIP_TESTS: true # Cannot exec iOS app on macOS
8787
- name: "Windows (amd64, Visual Studio, Schannel)"
8888
id: windows-amd64-vs
89-
os: windows-2019
89+
os: windows-2022
9090
setup-script: win32
9191
env:
9292
ARCH: amd64
93-
CMAKE_GENERATOR: Visual Studio 16 2019
93+
CMAKE_GENERATOR: Visual Studio 17 2022
9494
CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DUSE_HTTPS=Schannel -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2
9595
BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin
9696
BUILD_TEMP: D:\Temp
9797
SKIP_SSH_TESTS: true
9898
SKIP_NEGOTIATE_TESTS: true
9999
- name: "Windows (x86, Visual Studio, WinHTTP)"
100100
id: windows-x86-vs
101-
os: windows-2019
101+
os: windows-2022
102102
setup-script: win32
103103
env:
104104
ARCH: x86
105-
CMAKE_GENERATOR: Visual Studio 16 2019
105+
CMAKE_GENERATOR: Visual Studio 17 2022
106106
CMAKE_OPTIONS: -A Win32 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2
107107
BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin
108108
BUILD_TEMP: D:\Temp
109109
SKIP_SSH_TESTS: true
110110
SKIP_NEGOTIATE_TESTS: true
111111
- name: "Windows (amd64, mingw, WinHTTP)"
112112
id: windows-amd64-mingw
113-
os: windows-2019
113+
os: windows-2022
114114
setup-script: mingw
115115
env:
116116
ARCH: amd64
@@ -122,7 +122,7 @@ jobs:
122122
SKIP_NEGOTIATE_TESTS: true
123123
- name: "Windows (x86, mingw, Schannel)"
124124
id: windows-x86-mingw
125-
os: windows-2019
125+
os: windows-2022
126126
setup-script: mingw
127127
env:
128128
ARCH: x86
@@ -324,10 +324,10 @@ jobs:
324324
SKIP_NEGOTIATE_TESTS: true
325325
- name: "Windows (no mmap)"
326326
id: windows-nommap
327-
os: windows-2019
327+
os: windows-2022
328328
env:
329329
ARCH: amd64
330-
CMAKE_GENERATOR: Visual Studio 16 2019
330+
CMAKE_GENERATOR: Visual Studio 17 2022
331331
CFLAGS: -DNO_MMAP
332332
CMAKE_OPTIONS: -A x64 -DDEPRECATE_HARD=ON
333333
SKIP_SSH_TESTS: true
@@ -356,7 +356,7 @@ jobs:
356356
os: ubuntu-latest
357357
- name: "macOS (SHA256)"
358358
id: macos-sha256
359-
os: macos-12
359+
os: macos-13
360360
setup-script: osx
361361
env:
362362
CC: clang
@@ -366,10 +366,10 @@ jobs:
366366
SKIP_NEGOTIATE_TESTS: true
367367
- name: "Windows (SHA256, amd64, Visual Studio)"
368368
id: windows-sha256
369-
os: windows-2019
369+
os: windows-2022
370370
env:
371371
ARCH: amd64
372-
CMAKE_GENERATOR: Visual Studio 16 2019
372+
CMAKE_GENERATOR: Visual Studio 17 2022
373373
CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DEXPERIMENTAL_SHA256=ON
374374
SKIP_SSH_TESTS: true
375375
SKIP_NEGOTIATE_TESTS: true
@@ -481,15 +481,15 @@ jobs:
481481

482482
# Initializes the CodeQL tools for scanning.
483483
- name: Initialize CodeQL
484-
uses: github/codeql-action/init@v2
484+
uses: github/codeql-action/init@v3
485485
with:
486486
languages: 'cpp'
487487

488488
- name: Build
489489
run: |
490490
mkdir build
491491
cd build
492-
cmake .. -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON
492+
cmake .. -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON
493493
cmake --build .
494494
495495
- name: Perform CodeQL Analysis

ci/setup-ios-build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
set -ex
44

55
brew update
6-
brew install pkgconfig libssh2 ninja
6+
brew install ninja
77

8-
ln -s /Applications/Xcode.app/Contents/Developer/usr/lib/libLeaksAtExit.dylib /usr/local/lib
8+
sudo mkdir /usr/local/lib || true
9+
sudo chmod 0755 /usr/local/lib
10+
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/lib/libLeaksAtExit.dylib /usr/local/lib
911

1012
curl -s -L https://raw.githubusercontent.com/leetal/ios-cmake/master/ios.toolchain.cmake -o ios.toolchain.cmake

ci/setup-osx-build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
set -ex
44

55
brew update
6-
brew install pkgconfig libssh2 ninja
6+
brew install ninja
77

8-
ln -s /Applications/Xcode.app/Contents/Developer/usr/lib/libLeaksAtExit.dylib /usr/local/lib
8+
sudo mkdir /usr/local/lib || true
9+
sudo chmod 0755 /usr/local/lib
10+
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/lib/libLeaksAtExit.dylib /usr/local/lib

deps/pcre/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ check_type_size("unsigned long long" UNSIGNED_LONG_LONG)
2222

2323
disable_warnings(unused-function)
2424
disable_warnings(implicit-fallthrough)
25+
disable_warnings(unused-but-set-variable)
2526

2627
# User-configurable options
2728

src/libgit2/transports/ssh_libssh2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ static int ssh_stream_read(
115115
size_t buf_size,
116116
size_t *bytes_read)
117117
{
118-
int rc;
119118
ssh_stream *s = GIT_CONTAINER_OF(stream, ssh_stream, parent);
119+
ssize_t rc;
120120

121121
*bytes_read = 0;
122122

@@ -135,15 +135,14 @@ static int ssh_stream_read(
135135
*/
136136
if (rc == 0) {
137137
if ((rc = libssh2_channel_read_stderr(s->channel, buffer, buf_size)) > 0) {
138-
git_error_set(GIT_ERROR_SSH, "%*s", rc, buffer);
138+
git_error_set(GIT_ERROR_SSH, "%*s", (int)rc, buffer);
139139
return GIT_EEOF;
140140
} else if (rc < LIBSSH2_ERROR_NONE) {
141141
ssh_error(s->session, "SSH could not read stderr");
142142
return -1;
143143
}
144144
}
145145

146-
147146
*bytes_read = rc;
148147

149148
return 0;
@@ -1015,7 +1014,8 @@ static int list_auth_methods(int *out, LIBSSH2_SESSION *session, const char *use
10151014

10161015
*out = 0;
10171016

1018-
list = libssh2_userauth_list(session, username, strlen(username));
1017+
list = libssh2_userauth_list(session, username,
1018+
(unsigned int)strlen(username));
10191019

10201020
/* either error, or the remote accepts NONE auth, which is bizarre, let's punt */
10211021
if (list == NULL && !libssh2_userauth_authenticated(session)) {

0 commit comments

Comments
 (0)
0