-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: publish assets to draft github releases
- Loading branch information
Showing
3 changed files
with
89 additions
and
92 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
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 |
---|---|---|
|
@@ -19,3 +19,66 @@ jobs: | |
uses: ipdxco/unified-github-workflows/.github/workflows/[email protected] | ||
with: | ||
sources: '["version.json"]' | ||
upload-release-assets: | ||
needs: [release-check] | ||
if: fromJSON(needs.release-check.outputs.json)['version.json'] | ||
name: Publish the static library (${{ matrix.runner }}) | ||
runs-on: ${{ matrix.runner }} | ||
strategy: | ||
matrix: | ||
runner: ['ubuntu-latest', ['self-hosted', 'linux', 'arm64', 'xlarge'], 'macos-latest'] | ||
fail-fast: false | ||
steps: | ||
- run: echo "Running on $RUNNER_OS $RUNNER_ARCH" | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: ./.github/actions/configure-environment | ||
- if: runner.os == 'macOS' | ||
run: | | ||
cd rust && rustup target add x86_64-apple-darwin | ||
cd rust && cargo fetch | ||
- if: runner.os == 'Linux' | ||
name: Build and publish the standard release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: | | ||
cd rust | ||
REPOSITORY_NAME=${GITHUB_REPOSITORY##*/} | ||
TARBALL_PATH="/tmp/${REPOSITORY_NAME}-$(uname)-$(uname -m)-standard.tar.gz" | ||
RELEASE_NAME="${REPOSITORY_NAME}-$(uname)-$(uname -m)-standard" | ||
# 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 $RELEASE_NAME | ||
- if: runner.os == 'Linux' | ||
name: Build the optimized release | ||
run: | | ||
cd rust | ||
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 | ||
- if: runner.os == 'macOS' | ||
name: Build and publish the universal standard release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: | | ||
cd rust | ||
REPOSITORY_NAME=${GITHUB_REPOSITORY##*/} | ||
RELEASE_NAME="${REPOSITORY_NAME}-$(uname)-standard" | ||
TARBALL_PATH="/tmp/${RELEASE_NAME}.tar.gz" | ||
# 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 $RELEASE_NAME |
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