Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f0233d033 |
@@ -1,8 +1,9 @@
|
|||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
push:
|
||||||
branches: ['main']
|
branches: ['main']
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -11,10 +11,6 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
release_id: ${{ steps.create.outputs.release_id }}
|
release_id: ${{ steps.create.outputs.release_id }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Create Gitea release
|
- name: Create Gitea release
|
||||||
id: create
|
id: create
|
||||||
env:
|
env:
|
||||||
@@ -22,12 +18,11 @@ jobs:
|
|||||||
TAG: ${{ github.ref_name }}
|
TAG: ${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -qq && sudo apt-get install -y -qq jq
|
sudo apt-get update -qq && sudo apt-get install -y -qq jq
|
||||||
body=$(git for-each-ref --format='%(contents)' "refs/tags/$TAG")
|
|
||||||
release_id=$(curl -s -X POST \
|
release_id=$(curl -s -X POST \
|
||||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases" \
|
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases" \
|
||||||
-H "Authorization: token $GITEA_TOKEN" \
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":$(echo "$body" | jq -Rs .)}" | jq -r '.id')
|
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\"}" | jq -r '.id')
|
||||||
echo "release_id=$release_id" >> $GITHUB_OUTPUT
|
echo "release_id=$release_id" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build-linux-x86_64:
|
build-linux-x86_64:
|
||||||
@@ -86,17 +81,20 @@ jobs:
|
|||||||
build-macos-arm64:
|
build-macos-arm64:
|
||||||
needs: create-release
|
needs: create-release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: joseluisq/rust-linux-darwin-builder:latest
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: src
|
working-directory: src
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Add target and install jq
|
- name: Install Rust + zigbuild
|
||||||
run: |
|
run: |
|
||||||
rustup target add aarch64-apple-darwin
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||||
apt-get update -qq && apt-get install -y -qq jq
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
|
sudo apt-get update -qq && sudo apt-get install -y -qq jq
|
||||||
|
pip install ziglang --quiet --break-system-packages
|
||||||
|
$HOME/.cargo/bin/cargo install cargo-zigbuild
|
||||||
|
$HOME/.cargo/bin/rustup target add aarch64-apple-darwin
|
||||||
|
|
||||||
- name: Cache cargo registry
|
- name: Cache cargo registry
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
@@ -109,11 +107,7 @@ jobs:
|
|||||||
restore-keys: macos-arm64-cargo-
|
restore-keys: macos-arm64-cargo-
|
||||||
|
|
||||||
- name: Build macOS binary
|
- name: Build macOS binary
|
||||||
env:
|
run: cargo zigbuild --release --target aarch64-apple-darwin --no-default-features
|
||||||
CC: aarch64-apple-darwin22.4-clang
|
|
||||||
CXX: aarch64-apple-darwin22.4-clang++
|
|
||||||
CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER: aarch64-apple-darwin22.4-clang
|
|
||||||
run: cargo build --release --target aarch64-apple-darwin
|
|
||||||
|
|
||||||
- name: Prepare and upload artifact
|
- name: Prepare and upload artifact
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -90,9 +90,5 @@ release: bump-version
|
|||||||
@jj git push --change @
|
@jj git push --change @
|
||||||
@new_version=$$(grep '^version = ' $(CARGO_TOML) | head -n 1 | sed 's/version = "\(.*\)"/\1/'); \
|
@new_version=$$(grep '^version = ' $(CARGO_TOML) | head -n 1 | sed 's/version = "\(.*\)"/\1/'); \
|
||||||
git_hash=$$(jj log -r @ --no-graph -T 'commit_id'); \
|
git_hash=$$(jj log -r @ --no-graph -T 'commit_id'); \
|
||||||
commits=$$(jj log -r 'latest(tags())..@' --no-graph -T 'description ++ "\n"' 2>/dev/null || \
|
git tag "v$$new_version" "$$git_hash" && \
|
||||||
jj log --no-graph -T 'description ++ "\n"' --limit 30); \
|
|
||||||
notes=$$(printf 'Write concise markdown release notes for obikmer (a Rust kmer genomics tool). Be technical and direct. Base them strictly on these commit messages:\n\n%s' "$$commits" | aichat 2>/dev/null); \
|
|
||||||
tag_msg="$${notes:-Release v$$new_version}"; \
|
|
||||||
git tag -a "v$$new_version" -m "$$tag_msg" "$$git_hash" && \
|
|
||||||
git push origin "v$$new_version"
|
git push origin "v$$new_version"
|
||||||
|
|||||||
Generated
+1
-1
@@ -1704,7 +1704,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "obikmer"
|
name = "obikmer"
|
||||||
version = "1.1.25"
|
version = "1.1.16"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"csv",
|
"csv",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "obikmer"
|
name = "obikmer"
|
||||||
version = "1.1.25"
|
version = "1.1.16"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
@@ -18,7 +18,7 @@ obikrope = { path = "../obikrope" }
|
|||||||
obikpartitionner = { path = "../obikpartitionner" }
|
obikpartitionner = { path = "../obikpartitionner" }
|
||||||
obisys = { path = "../obisys" }
|
obisys = { path = "../obisys" }
|
||||||
obiskio = { path = "../obiskio" }
|
obiskio = { path = "../obiskio" }
|
||||||
obikindex = { path = "../obikindex", default-features = false }
|
obikindex = { path = "../obikindex" }
|
||||||
obitaxonomy = { path = "../obitaxonomy" }
|
obitaxonomy = { path = "../obitaxonomy" }
|
||||||
obilayeredmap = { path = "../obilayeredmap" }
|
obilayeredmap = { path = "../obilayeredmap" }
|
||||||
clap = { version = "4", features = ["derive"] }
|
clap = { version = "4", features = ["derive"] }
|
||||||
@@ -33,6 +33,4 @@ tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
|
|||||||
pprof = { version = "0.13", features = ["prost-codec"], optional = true }
|
pprof = { version = "0.13", features = ["prost-codec"], optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["numa"]
|
|
||||||
numa = ["obikindex/numa"]
|
|
||||||
profiling = ["dep:pprof"]
|
profiling = ["dep:pprof"]
|
||||||
|
|||||||
Reference in New Issue
Block a user