Skip to content

Commit

Permalink
lower disk space usage in CI to remove spurious errors (#8843)
Browse files Browse the repository at this point in the history
Co-authored-by: vsaw <[email protected]>
  • Loading branch information
cenit and vsaw committed Sep 21, 2023
1 parent 4da0cd6 commit 39b854d
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 30 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ jobs:
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean

- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
Expand All @@ -101,7 +103,7 @@ jobs:
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
Expand Down Expand Up @@ -154,7 +156,9 @@ jobs:
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean

- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
Expand Down Expand Up @@ -205,7 +209,9 @@ jobs:
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean

- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
Expand Down Expand Up @@ -354,7 +360,7 @@ jobs:
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
Expand Down Expand Up @@ -392,7 +398,7 @@ jobs:
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
Expand Down Expand Up @@ -488,7 +494,7 @@ jobs:
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
Expand Down Expand Up @@ -538,7 +544,7 @@ jobs:
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
Expand Down Expand Up @@ -600,7 +606,7 @@ jobs:
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ jobs:
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean

- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
Expand All @@ -87,7 +89,7 @@ jobs:
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
Expand All @@ -113,7 +115,9 @@ jobs:
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean

- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
Expand Down Expand Up @@ -154,7 +158,9 @@ jobs:
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean

- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
Expand Down Expand Up @@ -259,7 +265,7 @@ jobs:
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
Expand All @@ -283,7 +289,7 @@ jobs:
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
Expand Down Expand Up @@ -331,7 +337,7 @@ jobs:
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
Expand Down Expand Up @@ -362,7 +368,7 @@ jobs:
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
Expand Down
6 changes: 5 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,11 @@ if ($UseVCPKG -And -Not $ForceLocalVCPKG) {
}
if (($null -eq $vcpkg_path) -and $UseVCPKG) {
if (-Not (Test-Path "$PWD/vcpkg${VCPKGSuffix}")) {
$proc = Start-Process -NoNewWindow -PassThru -FilePath $GIT_EXE -ArgumentList "clone https://github.com/microsoft/vcpkg vcpkg${VCPKGSuffix}"
$shallow_copy = ""
if($ForceOpenCVVersion -eq 0) {
$shallow_copy = " --depth 1 "
}
$proc = Start-Process -NoNewWindow -PassThru -FilePath $GIT_EXE -ArgumentList "clone $shallow_copy https://github.com/microsoft/vcpkg vcpkg${VCPKGSuffix}"
$handle = $proc.Handle
$proc.WaitForExit()
$exitCode = $proc.ExitCode
Expand Down
12 changes: 7 additions & 5 deletions scripts/deploy-cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ sudo apt-key del 7fa2af80
wget https://developer.download.nvidia.com/compute/cuda/repos/$distr_name/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get install -y build-essential g++
sudo apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget
sudo apt-get install -y zlib1g
sudo apt-get install -y --no-install-recommends build-essential g++
sudo apt-get install -y --no-install-recommends apt-transport-https ca-certificates gnupg software-properties-common wget
sudo apt-get install -y --no-install-recommends zlib1g
sudo apt-get dist-upgrade -y
sudo apt-get install -y --no-install-recommends cuda-${CUDA_VERSION_DASHED}
sudo apt-get install -y libcudnn8
sudo apt-get install -y libcudnn8-dev
sudo apt-get install -y --no-install-recommends libcudnn8
sudo apt-get install -y --no-install-recommends libcudnn8-dev

sudo rm -rf /usr/local/cuda
sudo ln -s /usr/local/cuda-${CUDA_VERSION} /usr/local/cuda

sudo apt-get clean
15 changes: 8 additions & 7 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,21 @@ elif [[ $(cut -f2 <<< $(lsb_release -i)) == "Ubuntu" ]]; then
if [ "$install_tools" = true ] ; then
echo "Installing tools"
sudo apt-get update
sudo apt-get install -y git ninja-build build-essential g++ nasm yasm gperf
sudo apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget
sudo apt-get install -y libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
sudo apt-get install -y --no-install-recommends git ninja-build build-essential g++ nasm yasm gperf
sudo apt-get install -y --no-install-recommends apt-transport-https ca-certificates gnupg software-properties-common wget
sudo apt-get install -y --no-install-recommends libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(cut -f2 <<< $(lsb_release -c)) main"
wget -q https://packages.microsoft.com/config/ubuntu/$(cut -f2 <<< $(lsb_release -r))/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install -y cmake
sudo apt-get install -y powershell
sudo apt-get install -y curl zip unzip tar
sudo apt-get install -y pkg-config autoconf libtool bison
sudo apt-get install -y --no-install-recommends cmake
sudo apt-get install -y --no-install-recommends powershell
sudo apt-get install -y --no-install-recommends curl zip unzip tar
sudo apt-get install -y --no-install-recommends pkg-config autoconf libtool bison
sudo apt-get clean
fi
else
if [ "$install_cuda" = true ] ; then
Expand Down

0 comments on commit 39b854d

Please sign in to comment.