Skip to content

Commit ff1a9b5

Browse files
committed
use script instead
1 parent 285ed2b commit ff1a9b5

File tree

5 files changed

+35
-19
lines changed

5 files changed

+35
-19
lines changed

.github/workflows/sycl-containers.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
- 'devops/scripts/install_drivers.sh'
1515
- 'devops/scripts/install_build_tools.sh'
1616
- '.github/workflows/sycl-containers.yaml'
17+
# These containers are created by another workflows.
18+
paths-ignore:
19+
- 'devops/containers/release_build.Dockerfile'
20+
- 'devops/containers/release_tests_binaries.Dockerfile'
1721
pull_request:
1822
paths:
1923
- 'devops/actions/build_container/**'
@@ -22,6 +26,10 @@ on:
2226
- 'devops/scripts/install_drivers.sh'
2327
- 'devops/scripts/install_build_tools.sh'
2428
- '.github/workflows/sycl-containers.yaml'
29+
# These containers are created by another workflows.
30+
paths-ignore:
31+
- 'devops/containers/release_build.Dockerfile'
32+
- 'devops/containers/release_tests_binaries.Dockerfile'
2533

2634
permissions: read-all
2735

devops/containers/release_build.Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ RUN dnf -y install https://repo.radeon.com/amdgpu-install/6.4.1/rhel/8.10/amdgpu
2121
dnf clean all && rm -rf /var/cache/dnf
2222

2323
# Build zstd static library from sources
24-
RUN git clone https://github.com/facebook/zstd.git /tmp/zstd && \
25-
make -C /tmp/zstd && \
26-
make -C /tmp/zstd install && \
27-
rm -rf /tmp/zstd
24+
COPY scripts/build_zstd.sh /build_zstd.sh
25+
RUN /build_zstd.sh
2826

2927
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
3028

devops/containers/ubuntu2404_base.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ RUN /install.sh
1717
# This causes linking errors when building SYCL runtime.
1818
# Bug: https://github.com/intel/llvm/issues/15935
1919
# Workaround: build zstd from sources with -fPIC flag.
20-
COPY scripts/build_zstd_1_5_6_ub24.sh /build_zstd_1_5_6_ub24.sh
21-
RUN /build_zstd_1_5_6_ub24.sh
20+
COPY scripts/build_zstd.sh /build_zstd.sh
21+
RUN /build_zstd.sh
2222

2323
COPY scripts/create-sycl-user.sh /user-setup.sh
2424
RUN /user-setup.sh

devops/containers/ubuntu2404_build.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ RUN /install.sh
1212
# This causes linking errors when building SYCL runtime.
1313
# Bug: https://github.com/intel/llvm/issues/15935
1414
# Workaround: build zstd from sources with -fPIC flag.
15-
COPY scripts/build_zstd_1_5_6_ub24.sh /build_zstd_1_5_6_ub24.sh
16-
RUN /build_zstd_1_5_6_ub24.sh
15+
COPY scripts/build_zstd.sh /build_zstd.sh
16+
RUN /build_zstd.sh
1717

1818
SHELL ["/bin/bash", "-ec"]
1919

devops/scripts/build_zstd_1_5_6_ub24.sh renamed to devops/scripts/build_zstd.sh

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
#!/bin/bash
22

3-
# Script to build and install zstd 1.5.6 on Ubuntu 24, with -fPIC flag.
3+
# Script to build and install zstd on Ubuntu 24, with -fPIC flag.
44
# The default installation of zstd on Ubuntu 24 does not have -fPIC flag
55
# enabled, which is required for building DPC++ in shared libraries mode.
66

7-
# Function to check if the OS is Ubuntu 24
7+
# OR on Rocky Linux 8.10 (used for nightly release builds). There is no static
8+
# library (libzstd.a) in available packages, therefore it is necessary to build
9+
# it from source.
10+
11+
# Function to check OS
812
check_os() {
13+
local expected_name="$1"
14+
local expected_version="$2"
915
. /etc/os-release
10-
if [[ "$NAME" != "Ubuntu" || "$VERSION_ID" != "24.04" ]]; then
11-
echo "Warning: This script has only been tested with Ubuntu 24."
16+
if [[ "$NAME" == "$expected_name" && "$VERSION_ID" == "$expected_version" ]]; then
17+
return 0
18+
else
19+
return 1
1220
fi
1321
}
1422

@@ -59,19 +67,21 @@ EOF
5967
}
6068

6169
# Check the OS
62-
check_os
70+
if ! check_os "Ubuntu" "24.04" && ! check_os "Rocky Linux" "8.10"; then
71+
echo "Warning: This script has only been tested with Ubuntu 24.04 and Rocky Linux 8.10."
72+
fi
6373

6474
# Set USE_SUDO to true or false based on your preference
6575
USE_SUDO=true
6676

67-
# Install necessary build tools
68-
install_packages
69-
70-
# Uninstall libzstd-dev package if installed
71-
uninstall_libzstd_dev
77+
# Install necessary build tools & uninstall libzstd-dev package if installed
78+
if check_os "Ubuntu" "24.04"; then
79+
install_packages
80+
uninstall_libzstd_dev
81+
fi
7282

7383
# Define the version and URL for zstd
74-
ZSTD_VERSION="1.5.6"
84+
ZSTD_VERSION="1.5.7"
7585
ZSTD_URL="https://github.com/facebook/zstd/releases/download/v$ZSTD_VERSION/zstd-$ZSTD_VERSION.tar.gz"
7686

7787
# Create a directory for the source code

0 commit comments

Comments
 (0)