Skip to content

Commit b279ec7

Browse files
authored
chore(ci): Fix release workflow (#204)
As expected, I didn't get this right on the first try. This is mostly a few fixups plus getting a cast fro Linux on arm64 correct.
1 parent 6ac41e6 commit b279ec7

File tree

6 files changed

+31
-8
lines changed

6 files changed

+31
-8
lines changed

.github/workflows/nightly-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- "dynamic"
2424
os:
2525
- "ubuntu-latest"
26-
# - "linux-arm64-ubuntu24"
26+
- "linux-arm64-ubuntu24"
2727
- "macos-13"
2828
- "macos-latest"
2929
runs-on: ${{ matrix.os }}

.github/workflows/pr-ci.yml

+17-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,14 @@ jobs:
3737
3838
lint:
3939
name: "Lint - Stable"
40-
runs-on: ubuntu-latest
40+
strategy:
41+
matrix:
42+
os:
43+
- "ubuntu-latest"
44+
- "linux-arm64-ubuntu24"
45+
- "macos-13"
46+
- "macos-latest"
47+
runs-on: ${{ matrix.os }}
4148
steps:
4249
- name: Checkout tiledb-rs
4350
uses: actions/checkout@v4
@@ -57,7 +64,14 @@ jobs:
5764
lint-nightly:
5865
name: "Lint - Nightly"
5966
continue-on-error: true
60-
runs-on: ubuntu-latest
67+
strategy:
68+
matrix:
69+
os:
70+
- "ubuntu-latest"
71+
- "linux-arm64-ubuntu24"
72+
- "macos-13"
73+
- "macos-latest"
74+
runs-on: ${{ matrix.os }}
6175
steps:
6276
- name: Checkout tiledb-rs
6377
uses: actions/checkout@v4
@@ -76,6 +90,7 @@ jobs:
7690

7791
check-pr-title:
7892
name: "Check Title Format"
93+
if: ${{ github.ref != 'refs/heads/main' }}
7994
runs-on: ubuntu-latest
8095
steps:
8196
- name: "Check Title Format"

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Nightly CI
1+
name: Release
22
on:
33
workflow_dispatch:
44
push:

RELEASING.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ which just means you get to skip a few chore steps.
2121
1. Create a new `release-x.y` branch
2222
2. Perform any maintenance actions
2323
3. Run `./scripts/make-release.sh`
24+
4. When the Release workflow succeeds, publish the release using the GitHub UI
2425

2526
### 1. Create a new `release-x.y` Branch
2627

scripts/make-release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
NOTES=$(git cliff --unreleased --tag $1)
44
git tag -a --cleanup verbatim -e -m "$NOTES" $1
55
git push origin $1
6-
gh release create $1 --verify-tag --notes "$NOTES"
6+
gh release create $1 --draft --verify-tag --notes "$NOTES"

tiledb/api/src/string.rs

+10-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,16 @@ impl TDBString {
4848
};
4949

5050
if res == ffi::TILEDB_OK {
51-
let raw_slice: &[u8] = unsafe {
52-
std::slice::from_raw_parts(c_str as *const u8, c_len)
53-
};
51+
// The type of `c_str` is platform dependent which means that we
52+
// have to cast anything that might use i8 to u8. However, this
53+
// means that platforms (i.e., Ubuntu arm64) that have a u8
54+
// c_char type will generate a clippy error about an unnecessary
55+
// cast from u8 to u8. Hence why we're ignoring the lint here.
56+
#[allow(clippy::unnecessary_cast)]
57+
let c_u8_str = c_str as *const u8;
58+
59+
let raw_slice: &[u8] =
60+
unsafe { std::slice::from_raw_parts(c_u8_str, c_len) };
5461
match std::str::from_utf8(raw_slice) {
5562
Ok(s) => Ok(s.to_owned()),
5663
Err(e) => Err(Error::NonUtf8(raw_slice.to_vec(), e)),

0 commit comments

Comments
 (0)