Skip to content

Commit

Permalink
feat: publish snapshot on merge to main (#25644)
Browse files Browse the repository at this point in the history
  • Loading branch information
bnpfeife authored Dec 11, 2024
1 parent 9f541b7 commit b2f6c1a
Showing 1 changed file with 42 additions and 9 deletions.
51 changes: 42 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,20 @@ any_filter: &any_filter
release_filter: &release_filter
filters:
tags:
# This regex matches what is found in 'scripts/get-version' with the
# '[[:digit:]]' transformed into '\d'. This also excludes release
# candidate detection, because this filter only matches against
# full releases.
only: /^v(\d+)(?:\.(\d+))?(?:\.(\d+))?$/
branches:
ignore: /.*/

main_filter: &main_filter
filters:
branches:
only: main

nofork_filter: &nofork_filter
filters:
branches:
ignore: /pull\/[0-9]+/


commands:
rust_components:
description: Verify installed components
Expand Down Expand Up @@ -278,21 +278,24 @@ jobs:
parameters:
target:
type: string
profile:
type: string
default: release
steps:
- checkout
- run:
name: Install Target
command: rustup target add << parameters.target >>
- run:
name: Cargo release build
command: target-env cargo build --target=<< parameters.target >> --workspace --release
command: target-env cargo build --target=<< parameters.target >> --profile=<< parameters.profile >> --workspace
# linking might take a while and doesn't produce CLI output
no_output_timeout: 30m
- run:
name: tar and gzip build artifacts
command: |
mkdir -p artifacts
tar --ignore-failed-read -czvf "${PWD}/artifacts/influxdb3-edge_<< parameters.target >>.tar.gz" -C "${PWD}/target/<< parameters.target >>/release" influxdb3{,.exe}
tar --ignore-failed-read -czvf "${PWD}/artifacts/influxdb3-edge_<< parameters.target >>.tar.gz" -C "${PWD}/target/<< parameters.target >>/<< parameters.profile >>" influxdb3{,.exe}
- store_artifacts:
path: artifacts
- persist_to_workspace:
Expand Down Expand Up @@ -473,9 +476,40 @@ jobs:
- run: |
echo build executed successfully
workflows:
version: 2
snapshot:
jobs:
- build-release:
<<: *main_filter
name: build-snapshot-<< matrix.target >>
matrix:
parameters:
profile:
- quick-release
target:
- aarch64-apple-darwin
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- x86_64-pc-windows-gnu
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- build-packages:
<<: *main_filter
requires:
- build-release
- sign-packages:
<<: *main_filter
requires:
- build-packages
- publish-packages:
<<: *main_filter
matrix:
parameters:
destination: [ snapshots ]
requires:
- build-release
- sign-packages
ci:
jobs:
- fmt:
Expand Down Expand Up @@ -539,7 +573,6 @@ workflows:
arch: [ x86_64, aarch64 ]
requires:
- build-packages

- sign-packages:
<<: *release_filter
requires:
Expand Down

0 comments on commit b2f6c1a

Please sign in to comment.