This commit is contained in:
Pierre Dubouilh
2025-02-07 17:21:58 +01:00
parent 4cb7fc694a
commit 4decd89e44
4 changed files with 41 additions and 40 deletions
+9 -27
View File
@@ -1,37 +1,19 @@
name: deploy name: always
on: [push]
on: env:
push: CARGO_TERM_COLOR: always
tags:
- '*'
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - uses: actions/checkout@v2
uses: actions/checkout@v4 - name: Run CI
- name: Run tests
run: make ci run: make ci
- name: Install Cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build all artifacts - name: Build all artifacts
run: make build-all run: make build-all
- name: "Release gh release versioned"
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "builds/*"
bodyFile: "builds/buildout"
token: ${{ secrets.GITHUB_TOKEN }}
- name: "Release gh release latest"
uses: ncipollo/release-action@v1
with:
tag: latest
name: Latest
allowUpdates: true
artifacts: "builds/*"
bodyFile: "builds/buildout"
token: ${{ secrets.GITHUB_TOKEN }}
+25 -6
View File
@@ -1,13 +1,32 @@
name: always name: deploy
on: [push]
env: on:
CARGO_TERM_COLOR: always push:
tags:
- '*'
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - name: Checkout
- name: Run CI uses: actions/checkout@v4
- name: Run tests
run: make ci run: make ci
- name: Install Cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build all artifacts
run: make build-all
- name: "Release gh release latest"
uses: ncipollo/release-action@v1
with:
tag: latest
name: Latest
allowUpdates: true
artifacts: "builds/*"
bodyFile: "builds/buildout"
token: ${{ secrets.GITHUB_TOKEN }}
+7 -6
View File
@@ -16,14 +16,15 @@ ci:: test
cargo clippy -- -D warnings cargo clippy -- -D warnings
build-all:: build-all::
cargo build --target x86_64-unknown-linux-musl --release
mkdir -p builds mkdir -p builds
cp target/x86_64-unknown-linux-musl/release/blockfast builds
rustc --version > builds/buildout rustc --version > builds/buildout
sha256sum builds/blockfast >> builds/buildout cross build --release --target x86_64-unknown-linux-musl
cross build --release --target aarch64-unknown-linux-musl
publish:: ci cross build --release --target armv7-unknown-linux-musleabihf
cargo publish cp target/x86_64-unknown-linux-musl/release/blockfast builds/blockfast-x86_64-linux
cp target/aarch64-unknown-linux-musl/release/blockfast builds/blockfast-aarch64-linux
cp target/armv7-unknown-linux-musleabihf/release/blockfast builds/blockfast-arm7-linux
sha256sum builds/* >> builds/buildout
watch:: watch::
ls src/*.rs | entr -rc -- make run ls src/*.rs | entr -rc -- make run
-1
View File
@@ -39,7 +39,6 @@ pub fn resolve_path(a: &str) -> Result<PathBuf> {
} }
pub fn parse_regex(a: &str) -> Result<Regex> { pub fn parse_regex(a: &str) -> Result<Regex> {
println!("a {:?}", a);
let r: Regex = Regex::new(a).context("invalid regexp for generic parser")?; let r: Regex = Regex::new(a).context("invalid regexp for generic parser")?;
Ok(r) Ok(r)
} }