Skip to content

Commit d607dc9

Browse files
authored
Improve CI by caching depot and using ccache (#578)
1 parent eba05b7 commit d607dc9

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

.buildkite/pipeline.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,35 @@ steps:
77
OPENMPI_VER: "4.0"
88
OPENMPI_VER_FULL: "4.0.3"
99
UCX_VER: "1.12.1"
10+
CCACHE_DIR: "/root/ccache"
1011
commands: |
11-
apt-get install --yes --no-install-recommends curl
12+
echo "--- Install packages"
13+
apt-get install --yes --no-install-recommends curl ccache
14+
export PATH="/usr/lib/ccache/:$$PATH"
1215
16+
echo "--- Build UCX"
1317
curl -L https://github.com/openucx/ucx/releases/download/v$${UCX_VER}/ucx-$${UCX_VER}.tar.gz --output ucx.tar.gz
14-
tar -zxvf ucx.tar.gz
18+
tar -zxf ucx.tar.gz
1519
pushd ucx-*
1620
./configure --with-cuda=/usr/local/cuda --enable-mt --prefix=$$(realpath ../mpi-prefix)
1721
make -j
1822
make install
1923
popd
2024
25+
echo "--- Build OpenMPI"
2126
curl -L https://download.open-mpi.org/release/open-mpi/v$${OPENMPI_VER}/openmpi-$${OPENMPI_VER_FULL}.tar.gz --output openmpi.tar.gz
22-
tar -zxvf openmpi.tar.gz
27+
tar -zxf openmpi.tar.gz
2328
pushd openmpi-$${OPENMPI_VER_FULL}
2429
./configure --with-ucx=$$(realpath ../mpi-prefix) --prefix=$$(realpath ../mpi-prefix)
2530
make -j
2631
make install
2732
popd
2833
29-
tar -zcvf mpi-prefix.tar.gz mpi-prefix/
34+
echo "--- Package prefix"
35+
tar -zcf mpi-prefix.tar.gz mpi-prefix/
36+
37+
echo "--- ccache stats"
38+
ccache -s
3039
artifact_paths:
3140
- "mpi-prefix.tar.gz"
3241
- label: "Build OpenMPI -- ROCM"
@@ -37,33 +46,43 @@ steps:
3746
OPENMPI_VER: "4.0"
3847
OPENMPI_VER_FULL: "4.0.3"
3948
UCX_VER: "1.12.1"
49+
CCACHE_DIR: "/root/ccache"
4050
commands: |
41-
apt-get install --yes --no-install-recommends curl
51+
echo "--- Install packages"
52+
apt-get install --yes --no-install-recommends curl ccache
53+
export PATH="/usr/lib/ccache/:$$PATH"
4254
55+
echo "--- Build UCX"
4356
curl -L https://github.com/openucx/ucx/releases/download/v$${UCX_VER}/ucx-$${UCX_VER}.tar.gz --output ucx.tar.gz
44-
tar -zxvf ucx.tar.gz
57+
tar -zxf ucx.tar.gz
4558
pushd ucx-*
4659
./configure --with-rocm --enable-mt --prefix=$$(realpath ../mpi-prefix)
4760
make -j
4861
make install
4962
popd
5063
64+
echo "--- Build OpenMPI"
5165
curl -L https://download.open-mpi.org/release/open-mpi/v$${OPENMPI_VER}/openmpi-$${OPENMPI_VER_FULL}.tar.gz --output openmpi.tar.gz
52-
tar -zxvf openmpi.tar.gz
66+
tar -zxf openmpi.tar.gz
5367
pushd openmpi-*
5468
./configure --with-ucx=$$(realpath ../mpi-prefix) --prefix=$$(realpath ../mpi-prefix)
5569
make -j
5670
make install
5771
popd
5872
59-
tar -zcvf mpi-prefix.tar.gz mpi-prefix/
73+
echo "--- Package prefix"
74+
tar -zcf mpi-prefix.tar.gz mpi-prefix/
75+
76+
echo "--- ccache stats"
77+
ccache -s
6078
artifact_paths:
6179
- "mpi-prefix.tar.gz"
6280
- wait: ~
6381
- label: "CUDA -- 1.6"
6482
plugins:
6583
- JuliaCI/julia#v1:
6684
version: "1.6"
85+
persist_depot_dirs: packages,artifacts,compiled
6786
agents:
6887
queue: "juliagpu"
6988
cuda: "11.0"
@@ -83,7 +102,7 @@ steps:
83102
echo "--- Configure MPI"
84103
buildkite-agent artifact download --step "Build OpenMPI -- CUDA" mpi-prefix.tar.gz .
85104
mkdir -p $${JULIA_MPI_PATH}
86-
tar -zxvf mpi-prefix.tar.gz --strip-components 1 -C $${JULIA_MPI_PATH}
105+
tar -zxf mpi-prefix.tar.gz --strip-components 1 -C $${JULIA_MPI_PATH}
87106
export PATH=$${JULIA_MPI_PATH}/bin:$${PATH}
88107
export LD_LIBRARY_PATH=$${JULIA_MPI_PATH}/lib:$${LD_LIBRARY_PATH}
89108
@@ -105,6 +124,7 @@ steps:
105124
plugins:
106125
- JuliaCI/julia#v1:
107126
version: "1.7"
127+
persist_depot_dirs: packages,artifacts,compiled
108128
agents:
109129
queue: "juliagpu"
110130
cuda: "11.0"
@@ -124,7 +144,7 @@ steps:
124144
echo "--- Configure MPI"
125145
buildkite-agent artifact download --step "Build OpenMPI -- CUDA" mpi-prefix.tar.gz .
126146
mkdir -p $${JULIA_MPI_PATH}
127-
tar -zxvf mpi-prefix.tar.gz --strip-components 1 -C $${JULIA_MPI_PATH}
147+
tar -zxf mpi-prefix.tar.gz --strip-components 1 -C $${JULIA_MPI_PATH}
128148
export PATH=$${JULIA_MPI_PATH}/bin:$${PATH}
129149
export LD_LIBRARY_PATH=$${JULIA_MPI_PATH}/lib:$${LD_LIBRARY_PATH}
130150

0 commit comments

Comments
 (0)