diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1ffbe9a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +on: + - push +name: build::linux +jobs: + build_linux_x86_64_musl: + name: x86_64-musl + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.58.0 # keep in sync with MSRV in README.md/Cargo.toml + target: x86_64-unknown-linux-musl + override: true + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: test + args: --target x86_64-unknown-linux-musl + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: build --release + args: --target x86_64-unknown-linux-musl + + build_linux_aarch64_musl: + name: aarch64-musl + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.58.0 # keep in sync with MSRV in README.md/Cargo.toml + target: aarch64-unknown-linux-musl + override: true + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: test + args: --target aarch64-unknown-linux-musl + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: build --release + args: --target aarch64-unknown-linux-musl diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2baa74b..5c21732 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,13 +1,41 @@ -on: push -name: Clippy +on: + - push +name: lint jobs: - clippy_check: + clippy: + name: clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - run: rustup install 1.58.0 # keep in sync with MSRV in README.md/Cargo.toml - - run: rustup component add clippy - - uses: actions-rs/clippy-check@v1 + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features + profile: minimal + toolchain: 1.58.0 # keep in sync with MSRV in README.md/Cargo.toml + override: true + components: rustfmt, clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + # uncomment below to fail the build on warnings. I'd like to do this + # in the future, but during this early rapid development, some + # warnings predate adding clippy to CI and I don't have time just yet + # to fix those things (which are slated for refactor later anyway, in + # the case of all the "too many arguments" issues) + # + # args: -- -D warnings + + rustfmt: + name: rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.58.0 # keep in sync with MSRV in README.md/Cargo.toml + override: true + components: rustfmt, clippy + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check