-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
67 changed files
with
954 additions
and
1,504 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
File renamed without changes.
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,100 @@ | ||
#!/bin/bash -e | ||
|
||
release_artifacts() { | ||
local deb_linux_assets='Fedora-34 Ubuntu-18.04 Ubuntu-20.04' | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}" | ||
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 "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 '*.tar.gz' -exec mv {} ../ ";" | ||
cd ../ | ||
rm -r "${i}" | ||
done | ||
|
||
local zip_assets='2019 2022' | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}" | ||
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='Fedora-34 Ubuntu-18.04 Ubuntu-20.04' | ||
for distribution in $linux_dist; do | ||
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}/${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='2019 2022' | ||
for distribution in $windows_dist; do | ||
cd "${BUILD_ARTIFACTSTAGINGDIRECTORY}" | ||
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 |
File renamed without changes.
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,37 +1,24 @@ | ||
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-7.2#erroractionpreference | ||
$ErrorActionPreference = "Stop" | ||
$ErrorView = "NormalView" | ||
|
||
$COMPILER=$Env:COMPILER | ||
$ARCH=$Env:ARCH | ||
|
||
$src_dir=$pwd | ||
|
||
if ($ARCH -eq "Win32") { | ||
echo "Running cmake for $COMPILER on 32 bit..." | ||
mkdir build-win32 | ||
cp .\libiio.iss.cmakein .\build-win32 | ||
cd build-win32 | ||
|
||
cmake -G "$COMPILER" -A "$ARCH" -DCMAKE_SYSTEM_PREFIX_PATH="C:" -DENABLE_IPV6=OFF -DWITH_USB_BACKEND=ON -DWITH_SERIAL_BACKEND=ON -DPYTHON_BINDINGS=ON -DCSHARP_BINDINGS:BOOL=ON -DLIBXML2_LIBRARIES="C:\\libs\\32\\libxml2.lib" -DLIBUSB_LIBRARIES="C:\\libs\\32\\libusb-1.0.lib" -DLIBSERIALPORT_LIBRARIES="C:\\libs\\32\\libserialport.dll.a" -DLIBUSB_INCLUDE_DIR="C:\\include\\libusb-1.0" -DLIBXML2_INCLUDE_DIR="C:\\include\\libxml2" .. | ||
cmake --build . --config Release | ||
cp .\libiio.iss $env:BUILD_ARTIFACTSTAGINGDIRECTORY | ||
|
||
cd ../bindings/python | ||
python.exe setup.py.cmakein sdist | ||
Get-ChildItem dist\pylibiio-*.tar.gz | Rename-Item -NewName "libiio-py39-win32.tar.gz" | ||
mv .\dist\*.gz . | ||
rm .\dist\*.gz | ||
}else { | ||
echo "Running cmake for $COMPILER on 64 bit..." | ||
mkdir build-x64 | ||
cp .\libiio.iss.cmakein .\build-x64 | ||
cd build-x64 | ||
echo "Running cmake for $COMPILER on 64 bit..." | ||
mkdir build-x64 | ||
cp .\libiio.iss.cmakein .\build-x64 | ||
cd build-x64 | ||
|
||
cmake -G "$COMPILER" -A "$ARCH" -DCMAKE_SYSTEM_PREFIX_PATH="C:" -DENABLE_IPV6=OFF -DWITH_USB_BACKEND=ON -DWITH_SERIAL_BACKEND=ON -DPYTHON_BINDINGS=ON -DCSHARP_BINDINGS:BOOL=ON -DLIBXML2_LIBRARIES="C:\\libs\\64\\libxml2.lib" -DLIBUSB_LIBRARIES="C:\\libs\\64\\libusb-1.0.lib" -DLIBSERIALPORT_LIBRARIES="C:\\libs\\64\\libserialport.dll.a" -DLIBUSB_INCLUDE_DIR="C:\\include\\libusb-1.0" -DLIBXML2_INCLUDE_DIR="C:\\include\\libxml2" .. | ||
cmake --build . --config Release | ||
cp .\libiio.iss $env:BUILD_ARTIFACTSTAGINGDIRECTORY | ||
cmake -G "$COMPILER" -DCMAKE_SYSTEM_PREFIX_PATH="C:" -DENABLE_IPV6=OFF -DWITH_USB_BACKEND=ON -DWITH_SERIAL_BACKEND=ON -DPYTHON_BINDINGS=ON -DCSHARP_BINDINGS:BOOL=ON -DLIBXML2_LIBRARIES="C:\\libs\\64\\libxml2.lib" -DLIBUSB_LIBRARIES="C:\\libs\\64\\libusb-1.0.lib" -DLIBSERIALPORT_LIBRARIES="C:\\libs\\64\\libserialport.dll.a" -DLIBUSB_INCLUDE_DIR="C:\\include\\libusb-1.0" -DLIBXML2_INCLUDE_DIR="C:\\include\\libxml2" .. | ||
cmake --build . --config Release | ||
if ( $LASTEXITCODE -ne 0 ) { | ||
throw "[*] cmake build failure" | ||
} | ||
cp .\libiio.iss $env:BUILD_ARTIFACTSTAGINGDIRECTORY | ||
|
||
cd ../bindings/python | ||
python.exe setup.py.cmakein sdist | ||
Get-ChildItem dist\pylibiio-*.tar.gz | Rename-Item -NewName "libiio-py39-amd64.tar.gz" | ||
mv .\dist\*.gz . | ||
rm .\dist\*.gz | ||
} | ||
cd bindings/python | ||
python.exe setup.py sdist | ||
Get-ChildItem dist\pylibiio-*.tar.gz | Rename-Item -NewName "libiio-py39-amd64.tar.gz" | ||
mv .\dist\*.gz . | ||
rm .\dist\*.gz |
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,5 +1,8 @@ | ||
SET PATH=packages\Tools.InnoSetup.5.6.1\tools | ||
iscc $env:BUILD_ARTIFACTSTAGINGDIRECTORY\Windows-VS-16-2019-Win32\libiio.iss | ||
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-7.2#erroractionpreference | ||
$ErrorActionPreference = "Stop" | ||
$ErrorView = "NormalView" | ||
|
||
iscc $env:BUILD_ARTIFACTSTAGINGDIRECTORY\Windows-VS-2019-x64\libiio.iss | ||
|
||
Get-ChildItem $env:BUILD_ARTIFACTSTAGINGDIRECTORY -Force -Recurse | Remove-Item -Force -Recurse | ||
cp C:\libiio-setup.exe $env:BUILD_ARTIFACTSTAGINGDIRECTORY |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.