-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: switch libiio CI config to more standard yaml
- eliminate scripts and use code directly in azure-pipelines.yml - modify builds to use docker images containing all dependencies in order to reduce build time - modify files related to artifacts according with new builds Signed-off-by: Raluca Chis <[email protected]>
- Loading branch information
Showing
8 changed files
with
342 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -x | ||
uname -a | ||
DEBIAN_FRONTEND=noninteractive apt update | ||
DEBIAN_FRONTEND=noninteractive apt -y upgrade | ||
DEBIAN_FRONTEND=noninteractive apt install -y bison flex cmake git build-essential libxml2-dev doxygen | ||
DEBIAN_FRONTEND=noninteractive apt install -y python3 python3-sphinx python3-setuptools | ||
echo "$PWD" | ||
mkdir build && cd build | ||
cmake .. -DPYTHON_BINDINGS=ON -DENABLE_PACKAGING=ON -DCPACK_SYSTEM_NAME="{ARTIFACTNAME}" | ||
make | ||
make package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,100 @@ | ||
#!/bin/bash -e | ||
|
||
release_artifacts() { | ||
local rpm_assets='CentOS-7-x86_64' | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}" | ||
for i in $rpm_assets; do | ||
cd "${i}" | ||
find . -name '*.rpm' -exec mv {} ../ ";" | ||
cd ../ | ||
rm -r "${i}" | ||
done | ||
|
||
local deb_assets='Ubuntu-16.04-x86_64 Ubuntu-18.04-x86_64 | ||
Ubuntu-20.04-x86_64 Debian-Buster-ARM | ||
Debian-Buster-ARM64' | ||
local deb_linux_assets='Fedora-34 Ubuntu-18.04 Ubuntu-20.04' | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}" | ||
for i in $deb_assets; do | ||
cd "${i}" | ||
for i in $deb_linux_assets; do | ||
cd "Linux-${i}" | ||
if [ "${i}" == "Fedora-34" ]; then | ||
find . -name '*.rpm' -exec mv {} ../ ";" | ||
fi | ||
find . -name '*.deb' -exec mv {} ../ ";" | ||
cd ../ | ||
rm -r "${i}" | ||
rm -r "Linux-${i}" | ||
done | ||
|
||
local pkg_assets='macOS-10.15 macOS-11' | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}" | ||
for i in $pkg_assets; do | ||
cd "${i}" | ||
|
||
# change artifact name | ||
old_name=$(find . -name '*.pkg' | cut -b 3-26) | ||
name=$(echo "${old_name}" | cut -b 1-20) | ||
new_name="${name}-${i}.pkg" | ||
mv ./"${old_name}" ./"${new_name}" | ||
|
||
find . -name '*.pkg' -exec mv {} ../ ";" | ||
find . -name '*.gz' -exec mv {} ../ ";" | ||
find . -name '*.tar.gz' -exec mv {} ../ ";" | ||
cd ../ | ||
rm -r "${i}" | ||
done | ||
|
||
local windows_dist='Win32 x64' | ||
local zip_assets='2019 2022' | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}" | ||
for distribution in $windows_dist; do | ||
zip -r Windows-VS-16-2019-"${distribution}".zip Windows-VS-16-2019-"${distribution}" | ||
rm -r Windows-VS-16-2019-"${distribution}" | ||
for i in $zip_assets; do | ||
zip -r "Windows-VS-${i}-x64".zip "Windows-VS-${i}-x64" | ||
rm -r "Windows-VS-${i}-x64" | ||
done | ||
|
||
local deb_arm_assets='arm32v7 arm64v8 ppc64le x390x' | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}" | ||
for i in $deb_arm_assets; do | ||
cd "Ubuntu-${i}" | ||
find . -name '*.deb' -exec mv {} ../ ";" | ||
cd ../ | ||
rm -r "Ubuntu-${i}" | ||
done | ||
|
||
} | ||
|
||
swdownloads_artifacts() { | ||
local linux_dist='CentOS-7-x86_64 Ubuntu-16.04-x86_64 Ubuntu-18.04-x86_64 | ||
Ubuntu-20.04-x86_64 Debian-Buster-ARM Debian-Buster-ARM64' | ||
local linux_dist='Fedora-34 Ubuntu-18.04 Ubuntu-20.04' | ||
for distribution in $linux_dist; do | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}" | ||
cd "Linux-${distribution}" | ||
find . -name '*.rpm' -exec mv {} ../"${distribution}"_latest_master_libiio.rpm ";" | ||
find . -name '*.deb' -exec mv {} ../"${distribution}"_latest_master_libiio.deb ";" | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}/Linux-${distribution}" | ||
if [ "${distribution}" == "Fedora-34" ]; then | ||
find . -name '*.rpm' -exec mv {} ../"${distribution}_latest_master_libiio.rpm" ";" | ||
fi | ||
find . -name '*.tar.gz' -exec mv {} ../"${distribution}_latest_master_libiio.tar.gz" ";" | ||
find . -name '*.deb' -exec mv {} ../"${distribution}_latest_master_libiio.deb" ";" | ||
rm -r ../Linux-"${distribution}" | ||
done | ||
|
||
local macOS_dist='macOS-10.15 macOS-11' | ||
for distribution in $macOS_dist; do | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}" | ||
cd "${distribution}" | ||
find . -name '*.pkg' -exec mv {} ../"${distribution}"_latest_master_libiio.pkg ";" | ||
find . -name '*.tar.gz' -exec mv {} ../"${distribution}"_latest_master_libiio.tar.gz ";" | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}/${distribution}" | ||
find . -name '*.pkg' -exec mv {} ../"${distribution}_latest_master_libiio.pkg" ";" | ||
find . -name '*.tar.gz' -exec mv {} ../"${distribution}_latest_master_libiio.tar.gz" ";" | ||
rm -r ../"${distribution}" | ||
done | ||
|
||
local windows_dist='Win32 x64' | ||
local windows_dist='2019 2022' | ||
for distribution in $windows_dist; do | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}" | ||
zip -r Windows-VS-16-2019-"${distribution}".zip Windows-VS-16-2019-"${distribution}" | ||
rm -r Windows-VS-16-2019-"${distribution}" | ||
zip -r "Windows-VS-${distribution}-x64-latest_master_libiio".zip "Windows-VS-${distribution}-x64" | ||
rm -r "Windows-VS-${distribution}-x64" | ||
done | ||
|
||
local arm_dist='arm32v7 arm64v8 ppc64le x390x' | ||
for distribution in $arm_dist; do | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}/Ubuntu-${distribution}" | ||
find . -name '*.tar.gz' -exec mv {} ../"Ubuntu-${distribution}_latest_master_libiio.tar.gz" ";" | ||
find . -name '*.deb' -exec mv {} ../"Ubuntu-${distribution}_latest_master_libiio.deb" ";" | ||
rm -r ../Ubuntu-"${distribution}" | ||
done | ||
|
||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}/Libiio-Setup-Exe" | ||
mv libiio-setup.exe ../libiio-setup.exe | ||
rm -r ../Libiio-Setup-Exe | ||
} | ||
|
||
check_artifacts() { | ||
cd build | ||
while IFS= read -r line; do | ||
if [ -z "${line}" ]; then continue | ||
fi | ||
test -f ./artifacts/"${line}" && echo "${line} exist." || echo "${line} does not exist." | ||
done < "artifact_manifest.txt" | ||
} | ||
|
||
"${1}"_artifacts |
Oops, something went wrong.