-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust CI workflows to use the Rust codebase (#7)
* Use Cargo in Build & Test CI jobs Signed-off-by: Atanas Dinov <[email protected]> * Use Cargo in Release CI job Signed-off-by: Atanas Dinov <[email protected]> * Enforce stricter lint rules Signed-off-by: Atanas Dinov <[email protected]> * Update Cargo.toml Signed-off-by: Atanas Dinov <[email protected]> * Ignore tags in Build & Test CI workflow Signed-off-by: Atanas Dinov <[email protected]> * Replace standard compilation with a container build While built-in cargo compilation is much faster (especially when targetting aarch64), using the latest Ubuntu version causes incompatible (in the short term) and unreliable (in the long term) builds causing issues for the targeted SUSE distros - Leap / SLE Micro. Signed-off-by: Atanas Dinov <[email protected]> --------- Signed-off-by: Atanas Dinov <[email protected]>
- Loading branch information
1 parent
f3aba85
commit f41669d
Showing
7 changed files
with
53 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
on: [push, pull_request] | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "*" | ||
|
||
name: Build & Test | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Format | ||
run: cargo fmt --all -- --check | ||
- name: Lint | ||
run: cargo clippy --all-targets --all-features -- -D warnings | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: [ lint ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20' | ||
- name: Build | ||
run: go build -v ./... | ||
run: cargo build | ||
- name: Test | ||
run: go test -v ./... | ||
run: cargo test --no-fail-fast | ||
env: | ||
RUST_LOG: debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
name = "nmc" | ||
version = "0.1.0" | ||
edition = "2021" | ||
authors = ["Atanas Dinov <[email protected]>"] | ||
license = "Apache-2.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM registry.suse.com/bci/rust:1.73 | ||
|
||
COPY . / | ||
WORKDIR / | ||
|
||
RUN cargo build --release --config net.git-fetch-with-cli=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ method=manual | |
[ipv6] | ||
addr-gen-mode=0 | ||
address0=::1/128 | ||
method=manual | ||
method=manual |