mirror of
https://github.com/pldubouilh/blockfast.git
synced 2026-08-28 04:46:58 -04:00
ci
This commit is contained in:
@@ -1,37 +1,19 @@
|
||||
name: deploy
|
||||
name: always
|
||||
on: [push]
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run tests
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run 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 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 }}
|
||||
|
||||
@@ -1,13 +1,32 @@
|
||||
name: always
|
||||
on: [push]
|
||||
name: deploy
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run CI
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run tests
|
||||
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 }}
|
||||
|
||||
@@ -16,14 +16,15 @@ ci:: test
|
||||
cargo clippy -- -D warnings
|
||||
|
||||
build-all::
|
||||
cargo build --target x86_64-unknown-linux-musl --release
|
||||
mkdir -p builds
|
||||
cp target/x86_64-unknown-linux-musl/release/blockfast builds
|
||||
rustc --version > builds/buildout
|
||||
sha256sum builds/blockfast >> builds/buildout
|
||||
|
||||
publish:: ci
|
||||
cargo publish
|
||||
cross build --release --target x86_64-unknown-linux-musl
|
||||
cross build --release --target aarch64-unknown-linux-musl
|
||||
cross build --release --target armv7-unknown-linux-musleabihf
|
||||
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::
|
||||
ls src/*.rs | entr -rc -- make run
|
||||
|
||||
@@ -39,7 +39,6 @@ pub fn resolve_path(a: &str) -> Result<PathBuf> {
|
||||
}
|
||||
|
||||
pub fn parse_regex(a: &str) -> Result<Regex> {
|
||||
println!("a {:?}", a);
|
||||
let r: Regex = Regex::new(a).context("invalid regexp for generic parser")?;
|
||||
Ok(r)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user