blob: 057c73367984df12882f7f59dae39848005c739f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
name: Download Boost
description: Download & unpack Boost
inputs:
boost-version:
description: Boost version
required: true
no-retry:
description: Don't retry downloads
required: false
default: 0
runs:
using: composite
steps:
- env:
ARG_BOOST_VERSION: ${{ inputs.boost-version }}
ARG_NO_RETRY: ${{ inputs.no-retry }}
run: |
$workspace = (Get-ChildItem env:GITHUB_WORKSPACE).Value
$version = (Get-ChildItem env:ARG_BOOST_VERSION).Value
$no_retry = (Get-ChildItem env:ARG_NO_RETRY).Value -eq '1'
echo "BOOST_VERSION=$version" >> $env:GITHUB_ENV
$parent_dir = Split-Path $workspace
$cache_dir = Join-Path $parent_dir 'boost'
echo "BOOST_CACHE_DIR=$cache_dir" >> $env:GITHUB_ENV
$dir_name = "boost_$($version.Replace('.', '_'))"
$dir = Join-Path $cache_dir $dir_name
echo "BOOST_DIR=$dir" >> $env:GITHUB_ENV
New-Item $cache_dir -Force -Type Directory | Out-Null
$args = @()
if ($no_retry) {
$args += '--no-retry'
}
& python -m project.boost.download --cache $cache_dir $args -- $version
shell: pwsh
|