mirror of
https://github.com/pldubouilh/blockfast.git
synced 2026-09-05 08:37:47 -04:00
ci
This commit is contained in:
@@ -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 }}
|
|
||||||
|
|||||||
@@ -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 }}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user