CI: Move build.yaml actions to Makefile.build

So that they can easily be performed locally with

make -f .gitea/Makefile.build

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
pull/490/head
Manos Pitsidianakis 4 weeks ago
parent e6fa7093bf
commit 1b3f2732b2
No known key found for this signature in database
GPG Key ID: 7729C7707F7E09D0

@ -0,0 +1,37 @@
# SPDX-License-Identifier: EUPL-1.2
#
# Makefile for: "Build and run Tests" workflow, in .gitea/workflows/build.yaml
.POSIX:
.SUFFIXES:
CARGO_INCREMENTAL ?= 0
CARGO_NET_RETRY ?= 10
CARGO_REGISTRIES_CRATES_IO_PROTOCOL ?= sparse
RUSTFLAGS ?= -D warnings -W unreachable-pub -W rust-2021-compatibility -C debuginfo=0
RUSTUP_MAX_RETRIES ?= 10
RUST_BACKTRACE ?= short
.PHONY: all
all: cargo-check compile cargo-test rustdoc-build rustdoc-test
printf "All completed.\n"
.PHONY: cargo-check
cargo-check:
printf "cargo-check\n"
cargo check --all-features --all --tests --examples --benches --bins
.PHONY: cargo-test-compiles
cargo-test-compiles:
printf "cargo-test-compiles\n"
cargo test --all --no-fail-fast --all-features --no-run --locked
.PHONY: cargo-test
cargo-test:
printf "cargo-test\n"
cargo nextest run --all --no-fail-fast --all-features --future-incompat-report -E 'not (test(smtp::test::test_smtp))'
.PHONY: rustdoc-build
rustdoc-build:
printf "rustdoc-build\n"
env DISPLAY= WAYLAND_DISPLAY= make build-rustdoc
.PHONY: rustdoc-test
rustdoc-test:
printf "rustdoc-test\n"
make test-docs

@ -85,19 +85,19 @@ jobs:
cargo install --quiet --version 0.9.54 --target "${{ matrix.target }}" cargo-nextest
- name: cargo-check
run: |
cargo check --all-features --all --tests --examples --benches --bins
- name: Compile
make -f ./.gitea/Makefile.build cargo-check
- name: cargo-test-compiles
if: success() || failure()
run: cargo test --all --no-fail-fast --all-features --no-run --locked
- name: cargo test
run: |
cargo nextest run --all --no-fail-fast --all-features --future-incompat-report -E 'not (test(smtp::test::test_smtp))'
#cargo test --all --no-fail-fast --all-features -- --nocapture --quiet
make -f ./.gitea/Makefile.build cargo-test-compiles
- name: cargo-test
run: |
make -f ./.gitea/Makefile.build cargo-test
- name: rustdoc build
if: success() || failure() # always run even if other steps fail, except when cancelled <https://stackoverflow.com/questions/58858429/how-to-run-a-github-actions-step-even-if-the-previous-step-fails-while-still-f>
run: |
make build-rustdoc
make -f ./.gitea/Makefile.build rustdoc-build
- name: rustdoc tests
if: success() || failure()
run: |
make test-docs
make -f ./.gitea/Makefile.build rustdoc-test

Loading…
Cancel
Save