Skip to content

Commit

Permalink
ci: restore azure pipelines
Browse files Browse the repository at this point in the history
- fix windows ci bug: copy recursively the files from subfolders
- implement retry download for sourceforge - it fails sometimes
- fix windows artifact structure
- fix macOS13 brew install python error
-

Signed-off-by: Adrian Stanea <[email protected]>
  • Loading branch information
Adrian-Stanea committed Nov 20, 2023
1 parent 0925bbb commit 5d4524d
Show file tree
Hide file tree
Showing 21 changed files with 227 additions and 310 deletions.
97 changes: 0 additions & 97 deletions .travis.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions CI/macOS/install_deps
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
TOP_DIR=$(pwd)
LIBIIO_VERSION=libiio-v0

set -x
set -ex

# Note: not installing 'mono', it comes with Azure images,
# but it doesn't look it's installed with Homebrew
brew install cmake doxygen libusb libxml2 swig curl python
# libiio deps
brew install doxygen libusb libxml2 ncurses cdk libserialport sphinx-doc pkg-config
pip3 install sphinx
brew install doxygen libusb libxml2 ncurses cdk libserialport sphinx-doc pkg-config
# libm2k deps
brew install cmake doxygen libusb libxml2 swig curl

pip3 install sphinx
pip3 install wheel twine build virtualenv

# Install glog
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion CI/ubuntu/install_deps
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ handle_default() {
}

handle_doxygen() {
# TODO: REVIEW THIS AFTER THE REWORK - IT MIGHT BREAK
# Install a recent version of doxygen
DOXYGEN_URL="wget https://sourceforge.net/projects/doxygen/files/rel-1.8.15/doxygen-1.8.15.src.tar.gz"
cd ${DEPS_DIR}
Expand Down
2 changes: 1 addition & 1 deletion CI/ubuntu/make_linux
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ handle_doxygen() {
make && sudo make install
make doc
cd ..
./CI/doxygen.sh
./CI/ubuntu/doxygen.sh
}

handle_ubuntu_docker() {
Expand Down
2 changes: 1 addition & 1 deletion CI/windows/create_zips.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ $BUILD_DIR = Join-Path $OUTSIDE_BUILD "libm2k-$PLATFORM\*"

$ARTIFACTS_DIR = Get-Item -Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY # path to repo
New-Item -Path (Join-Path $ARTIFACTS_DIR "libm2k-$PLATFORM") -ItemType Directory
Copy-Item -Path $BUILD_DIR -Destination (Join-Path $ARTIFACTS_DIR "libm2k-$PLATFORM")
Copy-Item -Path $BUILD_DIR -Destination (Join-Path $ARTIFACTS_DIR "libm2k-$PLATFORM") -Recurse -Container

Set-Location $SRC_DIR
15 changes: 14 additions & 1 deletion CI/windows/install_deps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,21 @@ function Install-Swig {
)
Write-Output "# Installing swig"
Set-Location $DIR_PATH

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
curl.exe -L -o "swigwin-4.0.0.zip" "https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.0.0/swigwin-4.0.0.zip/download"
# Potential alternative but still breaks
# Invoke-WebRequest -UserAgent "Wget" -Uri "https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.0.0/swigwin-4.0.0.zip/download" -OutFile "swigwin-4.0.0.zip"
$crnt_attempt=0
$max_attemps=10
do {
try {
curl.exe -L -o "swigwin-4.0.0.zip" "https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.0.0/swigwin-4.0.0.zip/download"
} catch {
Write-Output "## curl failed, retrying..."
Start-Sleep -s 3
}
} while (-not (Test-Path -Path "swigwin-4.0.0.zip") -and ($crnt_attempt++ -lt $max_attemps))

7z x "swigwin-4.0.0.zip" -oswig
Remove-Item "swigwin-4.0.0.zip"
Set-Location (Join-Path "swig" "swigwin-4.0.0")
Expand Down
Loading

0 comments on commit 5d4524d

Please sign in to comment.