Skip to content

Commit 676c98a

Browse files
committed
Fix cache
Increase the max delay threshold from 0.25 to 0.3
1 parent abf19d2 commit 676c98a

File tree

7 files changed

+96
-53
lines changed

7 files changed

+96
-53
lines changed

.github/actions/publish-pypi/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ runs:
3030
CIBW_BEFORE_ALL_LINUX: |
3131
echo "Building deps"
3232
yum install -y sudo;
33-
sudo ./scripts/download_install_libraries.sh capnp
33+
sudo ./scripts/download_install_libraries.sh capnp compile
34+
sudo ./scripts/download_install_libraries.sh capnp install
3435
CIBW_BUILD: "*manylinux_x86_64"
3536
CIBW_SKIP: "pp*"
3637
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"

.github/actions/setup-env/action.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,29 @@ runs:
3535
uses: actions/cache@v4
3636
with:
3737
path: |
38-
/usr/local/bin
39-
/usr/local/include
40-
/usr/local/lib
38+
capnproto-*
4139
key: ${{ inputs.os }}-${{ hashFiles('scripts/download_install_libraries.*') }}
4240

4341
- name: Download/Compile Libraries (Linux)
4442
shell: bash
4543
if: (inputs.os == 'Linux') && (steps.cache-library.outputs.cache-hit != 'true')
4644
run: |
47-
sudo ./scripts/download_install_libraries.sh capnp
45+
sudo ./scripts/download_install_libraries.sh capnp compile
4846
4947
- name: Download/Compile Libraries (Windows)
5048
shell: pwsh
5149
if: (inputs.os == 'Windows') && (steps.cache-boost-windows.outputs.cache-hit != 'true')
5250
run: |
53-
./scripts/download_install_libraries.ps1 capnp
51+
./scripts/download_install_libraries.ps1 capnp compile
52+
53+
- name: Install Libraries (Linux)
54+
shell: bash
55+
if: inputs.os == 'Linux'
56+
run: |
57+
sudo ./scripts/download_install_libraries.sh capnp install
58+
59+
- name: Install Libraries (Windows)
60+
shell: pwsh
61+
if: inputs.os == 'Windows'
62+
run: |
63+
./scripts/download_install_libraries.ps1 capnp install

scaler/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.12.1
1+
1.12.2

scripts/download_install_libraries.ps1

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,50 +20,67 @@ $NUM_CORES = [Environment]::ProcessorCount
2020

2121
# Main logic
2222
if ($args.Count -lt 2) {
23-
Write-Host "Usage: .\download_install_dependencies.ps1 [boost|capnp] [--prefix=DIR]"
23+
Write-Host "Usage: .\download_install_dependencies.ps1 [boost|capnp] [compile|install] [--prefix=DIR]"
2424
exit 1
2525
}
2626

2727
$dependency = $args[0]
28+
$action = $args[1]
2829

2930
# Download, compile, or install Boost
3031
if ($dependency -eq "boost") {
31-
$BOOST_FOLDER_NAME = "boost_" + $BOOST_VERSION -replace '\.', '_'
32-
$BOOST_PACKAGE_NAME = "$BOOST_FOLDER_NAME.tar.gz"
33-
$url = "https://archives.boost.org/release/$BOOST_VERSION/source/$BOOST_PACKAGE_NAME"
34-
35-
# Download and extract Boost
36-
# Necessary exe because of local dev env
37-
curl.exe -O $url --retry 100 --retry-max-time 3600
38-
tar -xzf $BOOST_PACKAGE_NAME
39-
Rename-Item -Path $BOOST_FOLDER_NAME -NewName "boost"
32+
if ($action -eq "compile") {
33+
$BOOST_FOLDER_NAME = "boost_" + $BOOST_VERSION -replace '\.', '_'
34+
$BOOST_PACKAGE_NAME = "$BOOST_FOLDER_NAME.tar.gz"
35+
$url = "https://archives.boost.org/release/$BOOST_VERSION/source/$BOOST_PACKAGE_NAME"
4036

41-
Copy-Item -Recurse -Path "boost\boost" -Destination "$PREFIX\include\boost"
42-
Write-Host "Installed Boost into $PREFIX\include\boost"
37+
# Download and extract Boost
38+
# Necessary exe because of local dev env
39+
curl.exe -O $url --retry 100 --retry-max-time 3600
40+
tar -xzf $BOOST_PACKAGE_NAME
41+
Rename-Item -Path $BOOST_FOLDER_NAME -NewName "boost"
42+
}
43+
elseif ($action -eq "install") {
44+
Copy-Item -Recurse -Path "boost\boost" -Destination "$PREFIX\include\boost"
45+
Write-Host "Installed Boost into $PREFIX\include\boost"
46+
}
47+
else {
48+
Write-Host "Argument needs to be either compile or install"
49+
exit 1
50+
}
4351
}
4452

4553
# Download, compile, or install Cap'n Proto
4654
elseif ($dependency -eq "capnp") {
47-
$CAPNP_FOLDER_NAME = "capnproto-c++-$CAPNP_VERSION"
48-
$CAPNP_PACKAGE_NAME = "$CAPNP_FOLDER_NAME.tar.gz"
49-
$url = "https://capnproto.org/$CAPNP_PACKAGE_NAME"
50-
51-
# Download and extract Cap'n Proto
52-
curl.exe -O $url --retry 100 --retry-max-time 3600
53-
tar -xzf $CAPNP_PACKAGE_NAME
54-
Rename-Item -Path $CAPNP_FOLDER_NAME -NewName "capnp"
55+
if ($action -eq "compile") {
56+
$CAPNP_FOLDER_NAME = "capnproto-c++-$CAPNP_VERSION"
57+
$CAPNP_PACKAGE_NAME = "$CAPNP_FOLDER_NAME.tar.gz"
58+
$url = "https://capnproto.org/$CAPNP_PACKAGE_NAME"
5559

56-
# Configure and build with Visual Studio using CMake
57-
Set-Location -Path "capnp"
58-
cmake -G "Visual Studio 17 2022" -B build
59-
cmake --build build --config Release
60+
# Download and extract Cap'n Proto
61+
curl.exe -O $url --retry 100 --retry-max-time 3600
62+
tar -xzf $CAPNP_PACKAGE_NAME
63+
Rename-Item -Path $CAPNP_FOLDER_NAME -NewName "capnp"
6064

61-
Set-Location -Path "capnp"
62-
cmake --install build --config Release --prefix $PREFIX
63-
Write-Host "Installed capnp into $PREFIX"
64-
}
65+
# Configure and build with Visual Studio using CMake
66+
Set-Location -Path "capnp"
67+
cmake -G "Visual Studio 17 2022" -B build
68+
cmake --build build --config Release
69+
}
70+
elseif ($action -eq "install") {
71+
$CAPNP_FOLDER_NAME = "capnproto-c++-$CAPNP_VERSION"
72+
Rename-Item -Path $CAPNP_FOLDER_NAME -NewName "capnp"
73+
Set-Location -Path "capnp"
74+
cmake --install build --config Release --prefix $PREFIX
75+
Write-Host "Installed capnp into $PREFIX"
76+
}
77+
else {
78+
Write-Host "Argument needs to be either compile or install"
79+
exit 1
80+
}
6581

6682
else {
6783
Write-Host "Usage: .\download_install_dependencies.ps1 [boost|capnp] [--prefix=DIR]"
6884
exit 1
6985
}
86+

scripts/download_install_libraries.sh

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,44 @@ fi
3131
PREFIX=`readlink -f $PREFIX`
3232
mkdir -p ${PREFIX}/include/
3333

34+
show_help() {
35+
echo "Usage: ./download_install_libraries.sh [boost|capnp] [compile|install] [--prefix=DIR]"
36+
exit 1
37+
}
38+
3439
if [ "$1" == "boost" ]; then
35-
BOOST_FOLDER_NAME="boost_$(echo $BOOST_VERSION | tr '.' '_')"
36-
BOOST_PACKAGE_NAME=${BOOST_FOLDER_NAME}.tar.gz
37-
curl -O https://archives.boost.io/release/${BOOST_VERSION}/source/${BOOST_PACKAGE_NAME} --retry 100 --retry-max-time 3600
38-
tar -xzf ${BOOST_PACKAGE_NAME}
40+
if [ "$2" == "compile" ]; then
41+
BOOST_FOLDER_NAME="boost_$(echo $BOOST_VERSION | tr '.' '_')"
42+
BOOST_PACKAGE_NAME=${BOOST_FOLDER_NAME}.tar.gz
43+
curl -O https://archives.boost.io/release/${BOOST_VERSION}/source/${BOOST_PACKAGE_NAME} --retry 100 --retry-max-time 3600
44+
tar -xzf ${BOOST_PACKAGE_NAME}
3945

40-
cp -r ${BOOST_FOLDER_NAME}/boost ${PREFIX}/include/.
41-
echo "Installed Boost into ${PREFIX}/include/boost"
46+
elif [ "$2" == "install" ]; then
47+
cp -r ${BOOST_FOLDER_NAME}/boost ${PREFIX}/include/.
48+
echo "Installed Boost into ${PREFIX}/include/boost"
4249

50+
else
51+
show_help
52+
fi
4353
elif [ "$1" == "capnp" ]; then
4454
CAPNP_FOLDER_NAME="capnproto-c++-$(echo $CAPNP_VERSION)"
45-
CAPNP_PACKAGE_NAME=${CAPNP_FOLDER_NAME}.tar.gz
46-
curl -O https://capnproto.org/${CAPNP_PACKAGE_NAME} --retry 100 --retry-max-time 3600
47-
tar -xzf ${CAPNP_PACKAGE_NAME}
55+
if [ "$2" == "compile" ]; then
56+
CAPNP_PACKAGE_NAME=${CAPNP_FOLDER_NAME}.tar.gz
57+
curl -O https://capnproto.org/${CAPNP_PACKAGE_NAME} --retry 100 --retry-max-time 3600
58+
tar -xzf ${CAPNP_PACKAGE_NAME}
59+
60+
cd ${CAPNP_FOLDER_NAME}
61+
./configure --prefix=${PREFIX} CXXFLAGS="${CXXFLAGS} -I${PREFIX}/include" LDFLAGS="${LDFLAGS} -L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib"
62+
make -j${NUM_CORES}
4863

49-
cd ${CAPNP_FOLDER_NAME}
50-
./configure --prefix=${PREFIX} CXXFLAGS="${CXXFLAGS} -I${PREFIX}/include" LDFLAGS="${LDFLAGS} -L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib"
51-
make -j${NUM_CORES}
52-
make install
53-
echo "Installed capnp into ${PREFIX}"
64+
elif [ "$2" == "install" ]; then
65+
cd ${CAPNP_FOLDER_NAME}
66+
make install
67+
echo "Installed capnp into ${PREFIX}"
5468

69+
else
70+
show_help
71+
fi
5572
else
56-
echo "Usage: ./download_install_libraries.sh [boost|capnp] [--prefix=DIR]"
57-
exit 1
73+
show_help
5874
fi
59-

tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def test_scheduler_crash(self):
265265
future.result()
266266

267267
def test_responsiveness(self):
268-
MAX_DELAY_SECONDS = 0.25
268+
MAX_DELAY_SECONDS = 0.3
269269

270270
# Makes sure the cluster has the time to start up.
271271
with Client(self.address) as client:

0 commit comments

Comments
 (0)