Skip to content

Commit 59909cd

Browse files
authored
ci: use windows-2025 for the gcc-windows job (since it has gcc 14.2.0) (#24304)
1 parent 87d3a1d commit 59909cd

6 files changed

Lines changed: 55 additions & 6 deletions

File tree

‎.github/workflows/find_openssl.bat‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@echo off
2+
setlocal EnableDelayedExpansion
3+
REM Find every openssl.exe reachable through PATH:
4+
for /f "delims=" %%F in ('where openssl 2^>nul') do (
5+
set "OPENSSL_DIR=%%~dpF"
6+
echo OpenSSL lives in: "!OPENSSL_DIR!"
7+
goto :end
8+
)
9+
echo OpenSSL not found in: "!PATH!"
10+
:end

‎.github/workflows/windows_ci.yml‎

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,35 @@ concurrency:
2525

2626
jobs:
2727
gcc-windows:
28-
runs-on: windows-2019
28+
runs-on: windows-2025
2929
timeout-minutes: 90
3030
env:
3131
VFLAGS: -cc gcc
3232
steps:
3333
- uses: actions/checkout@v4
34-
- name: Build
34+
- name: Show tool versions
3535
run: |
3636
gcc --version
37+
pkg-config --version
38+
openssl version
39+
echo "Flags for openssl:"
40+
pkg-config openssl --cflags
41+
echo "Flags for openssl libs:"
42+
pkg-config openssl --libs
43+
.github/workflows/find_openssl.bat
44+
echo "OpenSSL files:"
45+
where.exe /R "C:\Program Files\OpenSSL" *.*
46+
echo "Include files for openssl:"
47+
dir "c:/Program Files/OpenSSL/include"
48+
echo "Lib Include files for openssl:"
49+
dir "c:/Program Files/OpenSSL/lib/VC/x64/"
50+
- name: Build
51+
run: |
3752
.\make.bat -gcc
3853
.\v.exe symlink
54+
.\v.exe -stats vlib/crypto/ecdsa/ecdsa_test.v
55+
- name: Test v binaries
56+
run: v -silent build-vbinaries
3957
- name: All code is formatted
4058
run: v -silent test-cleancode
4159
- name: Test new v.c
@@ -64,8 +82,6 @@ jobs:
6482
run: v -autofree vlib/v/tests/options/option_test.c.v
6583
- name: Test v->js
6684
run: v -o hi.js examples/js_hello_world.v && node hi.js
67-
- name: Test v binaries
68-
run: v -silent build-vbinaries
6985
- name: Build examples
7086
run: v -silent build-examples
7187
- name: v2 self compilation

‎cmd/tools/modules/testing/common.v‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ pub const is_node_present = os.execute('node --version').exit_code == 0
4646
pub const is_go_present = os.execute('go version').exit_code == 0
4747

4848
pub const is_ruby_present = os.execute('ruby --version').exit_code == 0
49+
&& os.execute('pkg-config ruby --libs').exit_code == 0
4950

5051
pub const is_python_present = os.execute('python --version').exit_code == 0
52+
&& os.execute('pkg-config python3 --libs').exit_code == 0
5153

5254
pub const is_sqlite3_present = os.execute('sqlite3 --version').exit_code == 0
55+
&& os.execute('pkg-config sqlite3 --libs').exit_code == 0
5356

5457
pub const is_openssl_present = os.execute('openssl --version').exit_code == 0
58+
&& os.execute('pkg-config openssl --libs').exit_code == 0
5559

5660
pub const all_processes = get_all_processes()
5761

‎vlib/crypto/ecdsa/ecdsa.c.v‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ module ecdsa
1515
#flag linux -I/usr/local/include/openssl
1616
#flag linux -L/usr/local/lib64/
1717

18+
// Installed through choco:
19+
#flag windows -IC:/Program Files/OpenSSL-Win64/include
20+
#flag windows -LC:/Program Files/OpenSSL-Win64/lib/VC/x64/MD
21+
22+
// Installed on the CI:
23+
#flag windows -IC:/Program Files/OpenSSL/include
24+
#flag windows -LC:/Program Files/OpenSSL/lib/VC/x64/MD
25+
1826
#flag -I/usr/include/openssl
1927

2028
#flag -lcrypto

‎vlib/net/openssl/openssl.c.v‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,22 @@ module openssl
1414
// openssl.
1515
#flag freebsd -I/usr/local/include
1616
#flag freebsd -L/usr/local/lib
17+
18+
// Installed through choco:
19+
#flag windows -IC:/Program Files/OpenSSL-Win64/include
20+
#flag windows -LC:/Program Files/OpenSSL-Win64/lib/VC/x64/MD
21+
22+
// Installed on the CI:
23+
#flag windows -IC:/Program Files/OpenSSL/include
24+
#flag windows -LC:/Program Files/OpenSSL/lib/VC/x64/MD
25+
1726
$if $pkgconfig('openssl') {
1827
#pkgconfig --cflags --libs openssl
1928
} $else {
2029
#flag windows -l libssl -l libcrypto
21-
#flag -lssl -lcrypto
30+
$if !windows {
31+
#flag -lssl -lcrypto
32+
}
2233
#flag linux -ldl -lpthread
2334
// MacPorts
2435
#flag darwin -I/opt/local/include

‎vlib/v/gen/native/tests/native_test.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// vtest build: (amd64 || arm64) && !self_sandboxed_packaging?
1+
// vtest build: (amd64 || arm64) && !self_sandboxed_packaging? && !gcc-windows
22
import os
33
import time
44
import benchmark

0 commit comments

Comments
 (0)