Skip to content

Commit 4f87d78

Browse files
committed
create release
Change-Id: Iab67c1a9b566db54ff1fdcef99b992d004ad4eac
1 parent 608ac10 commit 4f87d78

File tree

1 file changed

+30
-21
lines changed

1 file changed

+30
-21
lines changed

.github/workflows/rust.yaml

+30-21
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,29 @@ jobs:
6161
- name: Upload to codecov.io
6262
uses: codecov/codecov-action@v1
6363

64+
sanitizer:
65+
name: Address Sanitizer
66+
needs: test
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v2
70+
# Need nightly rust.
71+
- uses: hecrj/setup-rust-action@v1
72+
with:
73+
rust-version: nightly
74+
components: rust-src
75+
- name: Tests with asan
76+
env:
77+
RUSTFLAGS: -Zsanitizer=address
78+
RUSTDOCFLAGS: -Zsanitizer=address
79+
ASAN_OPTIONS: "detect_stack_use_after_return=1:detect_leaks=1"
80+
# Work around https://github.com/rust-lang/rust/issues/59125 by
81+
# disabling backtraces. In an ideal world we'd probably suppress the
82+
# leak sanitization, but we don't care about backtraces here, so long
83+
# as the other tests have them.
84+
RUST_BACKTRACE: "0"
85+
run: cargo -Z build-std test --features 'bundled' --features 'modern-full' --target x86_64-unknown-linux-gnu
86+
6487
# cargo publish
6588
- uses: wangfenjin/publish-crates@main
6689
name: cargo publish --dry-run
@@ -86,26 +109,12 @@ jobs:
86109
uses: mikepenz/release-changelog-builder-action@v1
87110
env:
88111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89-
90-
sanitizer:
91-
name: Address Sanitizer
92-
needs: test
93-
runs-on: ubuntu-latest
94-
steps:
95-
- uses: actions/checkout@v2
96-
# Need nightly rust.
97-
- uses: hecrj/setup-rust-action@v1
112+
- name: Create Release
113+
if: startsWith(github.ref, 'refs/tags/')
114+
uses: actions/create-release@v1
98115
with:
99-
rust-version: nightly
100-
components: rust-src
101-
- name: Tests with asan
116+
tag_name: ${{ github.ref }}
117+
release_name: ${{ github.ref }}
118+
body: ${{steps.build_changelog.outputs.changelog}}
102119
env:
103-
RUSTFLAGS: -Zsanitizer=address
104-
RUSTDOCFLAGS: -Zsanitizer=address
105-
ASAN_OPTIONS: "detect_stack_use_after_return=1:detect_leaks=1"
106-
# Work around https://github.com/rust-lang/rust/issues/59125 by
107-
# disabling backtraces. In an ideal world we'd probably suppress the
108-
# leak sanitization, but we don't care about backtraces here, so long
109-
# as the other tests have them.
110-
RUST_BACKTRACE: "0"
111-
run: cargo -Z build-std test --features 'bundled' --features 'modern-full' --target x86_64-unknown-linux-gnu
120+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)