Skip to content

Commit ed4cb09

Browse files
committed
windows-2019
1 parent 457d420 commit ed4cb09

File tree

3 files changed

+33
-29
lines changed

3 files changed

+33
-29
lines changed

.github/workflows/windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
Windows_x86-64:
17-
runs-on: windows-2016
17+
runs-on: windows-2019
1818

1919
env:
2020
UPLOAD_ENABLED: ${{ secrets.DROPBOX_ACCESS_TOKEN }}

fsbuild/download.py

+30-26
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,8 @@
55
import os
66
import sys
77

8-
url = sys.argv[1]
9-
checksum = sys.argv[2]
108

11-
if checksum.startswith("sha256:"):
12-
h = hashlib.sha256
13-
checksum = checksum[7:]
14-
else:
15-
raise Exception("Unknown hash function")
16-
17-
18-
def verify():
9+
def verify(archive: str, h, checksum):
1910
with open(archive, "rb") as f:
2011
actual_checksum = h(f.read()).hexdigest()
2112
result = actual_checksum == checksum
@@ -25,25 +16,38 @@ def verify():
2516
print("Checksum verification failed")
2617
print("Expected", checksum)
2718
print("But got:", actual_checksum)
28-
2919
return result
3020

3121

32-
archive = url.split("/")[-1]
33-
if not os.path.exists("fsbuild/_sources"):
34-
os.makedirs("fsbuild/_sources")
35-
archive = os.path.join("fsbuild/_sources", archive)
22+
def main():
23+
url = sys.argv[1]
24+
checksum = sys.argv[2]
25+
26+
if checksum.startswith("sha256:"):
27+
h = hashlib.sha256
28+
checksum = checksum[7:]
29+
else:
30+
raise Exception("Unknown hash function")
31+
32+
archive = url.split("/")[-1]
33+
if not os.path.exists("fsbuild/_sources"):
34+
os.makedirs("fsbuild/_sources")
35+
archive = os.path.join("fsbuild/_sources", archive)
36+
37+
if os.path.exists(archive):
38+
if verify(archive, h, checksum):
39+
sys.exit(0)
40+
print("Removing archive", archive)
41+
os.remove(archive)
42+
43+
# FIXME: Replace use of wget, just use python instead
44+
if os.system(f'cd fsbuild/_sources && wget "{url}"') != 0:
45+
print("Failed to download")
46+
sys.exit(1)
3647

37-
if os.path.exists(archive):
38-
if verify():
39-
sys.exit(0)
40-
print("Removing archive", archive)
41-
os.remove(archive)
48+
if not verify(archive, h, checksum):
49+
sys.exit(2)
4250

43-
# FIXME: Replace use of wget, just use python instead
44-
if os.system(f'cd fsbuild/_sources && wget "{url}"') != 0:
45-
print("Failed to download")
46-
sys.exit(1)
4751

48-
if not verify():
49-
sys.exit(2)
52+
if __name__ == "__main__":
53+
main()

fsdeps/env.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export CMAKE_PREFIX_PATH=$FSDEPS_PREFIX
99

1010
export C_INCLUDE_PATH=$FSDEPS_PREFIX/include
1111
export CPLUS_INCLUDE_PATH=$FSDEPS_PREFIX/include
12-
export LIBRARY_PATH=$FSDEPS_PREFIX/lib
13-
export PKG_CONFIG_PATH=$FSDEPS_PREFIX/lib/pkgconfig
12+
export LIBRARY_PATH=$FSDEPS_PREFIX/lib:$FSDEPS_PREFIX/lib64
13+
export PKG_CONFIG_PATH=$FSDEPS_PREFIX/lib/pkgconfig:$FSDEPS_PREFIX/lib64/pkgconfig
1414

1515
export PATH=$FSDEPS_PREFIX/bin:$PATH
1616
export LD_LIBRARY_PATH=$FSDEPS_PREFIX/lib:$FSDEPS_PREFIX/lib64

0 commit comments

Comments
 (0)