-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'nix-rust:master' into master
- Loading branch information
Showing
128 changed files
with
8,162 additions
and
6,592 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
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,72 @@ | ||
name: 'Build' | ||
description: 'Build nix' | ||
inputs: | ||
# This is required | ||
TARGET: | ||
required: true | ||
|
||
BUILD: | ||
required: false | ||
default: build | ||
|
||
CLIPPYFLAGS: | ||
required: false | ||
default: -D warnings -A unknown-lints | ||
|
||
RUSTFLAGS: | ||
required: false | ||
default: -D warnings -A unknown-lints | ||
|
||
RUSTDOCFLAGS: | ||
required: false | ||
default: -D warnings | ||
|
||
TOOL: | ||
description: 'Tool used to involve the BUILD command, can be cargo or cross' | ||
required: false | ||
default: cargo | ||
|
||
ZFLAGS: | ||
required: false | ||
default: | ||
|
||
NOHACK: | ||
description: "whether to run cargo hack" | ||
required: false | ||
default: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: set up Rust env | ||
shell: bash | ||
run: | | ||
echo "RUSTFLAGS=${{ inputs.RUSTFLAGS }}" >> $GITHUB_ENV | ||
echo "RUSTDOCFLAGS=${{ inputs.RUSTDOCFLAGS }}" >> $GITHUB_ENV | ||
- name: debug info | ||
shell: bash | ||
run: | | ||
${{ inputs.TOOL }} -Vv | ||
rustc -Vv | ||
- name: build | ||
shell: bash | ||
run: ${{ inputs.TOOL }} ${{ inputs.BUILD }} ${{ inputs.ZFLAGS }} --target ${{ inputs.TARGET }} --all-targets --all-features | ||
|
||
- name: doc | ||
shell: bash | ||
run: ${{ inputs.TOOL }} doc ${{ inputs.ZFLAGS }} --no-deps --target ${{ inputs.TARGET }} --all-features | ||
|
||
- name: clippy | ||
shell: bash | ||
run: ${{ inputs.TOOL}} clippy ${{ inputs.ZFLAGS }} --target ${{ inputs.TARGET }} --all-targets --all-features -- ${{ inputs.CLIPPYFLAGS }} | ||
|
||
- name: Set up cargo-hack | ||
if: inputs.NOHACK == 'false' | ||
uses: taiki-e/install-action@cargo-hack | ||
|
||
- name: run cargo hack | ||
shell: bash | ||
if: inputs.NOHACK == 'false' | ||
run: ${{ inputs.TOOL }} hack ${{ inputs.ZFLAGS }} check --target ${{ inputs.TARGET }} --each-feature |
Oops, something went wrong.