-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathaction.yml
More file actions
89 lines (79 loc) · 3.32 KB
/
Copy pathaction.yml
File metadata and controls
89 lines (79 loc) · 3.32 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Upload Release Assets
description: Build and upload release assets to an existing GitHub release
inputs:
id:
description: The release ID
required: true
ref:
description: The release ref
required: true
force:
description: Force upload
required: false
default: 'false'
runs:
using: 'composite'
steps:
- run: echo "Running on $RUNNER_OS $RUNNER_ARCH"
shell: bash
- uses: actions/checkout@v6
with:
ref: ${{ inputs.ref }}
submodules: recursive
- uses: ./.github/actions/configure-environment
- if: runner.os == 'macOS'
run: |
rustup target add x86_64-apple-darwin
cargo fetch
working-directory: rust
shell: bash
- if: runner.os == 'Linux'
name: Build and publish the standard release
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_RELEASE_URL: ${{ github.api_url }}/repos/${{ github.repository }}/releases/${{ inputs.id }}
INPUTS_FORCE: ${{ inputs.force }}
run: |
REPOSITORY_NAME=${GITHUB_REPOSITORY##*/}
RELEASE_NAME="${REPOSITORY_NAME}-$(uname)-$(uname -m)-standard"
TARBALL_PATH="/tmp/${RELEASE_NAME}.tar.gz"
# Note: If assets should not be overwritten, exit early if they already exist
if [[ "$INPUTS_FORCE" == 'false' && "$(./scripts/check-release.sh $TARBALL_PATH)" == 'true' ]]; then
exit 0
fi
# Note: the blst dependency uses the portable configuration for maximum compatibility
./scripts/build-release.sh build --verbose --no-default-features --features multicore-sdr,opencl,blst-portable
./scripts/package-release.sh $TARBALL_PATH
./scripts/publish-release.sh $TARBALL_PATH
working-directory: rust
shell: bash
- if: runner.os == 'Linux'
name: Build the optimized release
run: |
REPOSITORY_NAME=${GITHUB_REPOSITORY##*/}
TARBALL_PATH="/tmp/${REPOSITORY_NAME}-$(uname)-$(uname -m)-optimized.tar.gz"
RUSTFLAGS="-C target-feature=$(cat rustc-target-features-optimized.json | jq -r '.[].rustc_target_feature' | tr '\n' ',')"
./scripts/build-release.sh build --verbose --no-default-features --features multicore-sdr,opencl
./scripts/package-release.sh $TARBALL_PATH
working-directory: rust
shell: bash
- if: runner.os == 'macOS'
name: Build and publish the universal standard release
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_RELEASE_URL: ${{ github.api_url }}/repos/${{ github.repository }}/releases/${{ inputs.id }}
INPUTS_FORCE: ${{ inputs.force }}
run: |
REPOSITORY_NAME=${GITHUB_REPOSITORY##*/}
RELEASE_NAME="${REPOSITORY_NAME}-$(uname)-standard"
TARBALL_PATH="/tmp/${RELEASE_NAME}.tar.gz"
# Note: If assets should not be overwritten, exit early if they already exist
if [[ "$INPUTS_FORCE" == 'false' && "$(./scripts/check-release.sh $TARBALL_PATH)" == 'true' ]]; then
exit 0
fi
# Note: the blst dependency uses the portable configuration for maximum compatibility
./scripts/build-release.sh lipo --verbose --no-default-features --features multicore-sdr,opencl,blst-portable
./scripts/package-release.sh $TARBALL_PATH
./scripts/publish-release.sh $TARBALL_PATH
working-directory: rust
shell: bash