Stop running useless commit update action #50
Workflow file for this run
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
# TODO: | |
# - generate shasum for each published zip, include it in metadata.yaml and in the release description | |
# - consider stripping debug symbols from binaries | |
# - optimize workflow to avoid having almost same matrix twice | |
# - avoid building with debug and release after - it should be better to build release only and test it | |
# - generate RELEASE.md changelog | |
# - change ubuntu to alpine in Dockerfile.ci and Dockerfile | |
# - merge Docker meta into one step | |
# - implement cargo-semver-checks | |
name: test | |
on: | |
pull_request: | |
branches: | |
- master | |
types: [opened, synchronize, reopened] | |
env: | |
CRATE_NAME: iggy | |
GITHUB_TOKEN: ${{ github.token }} | |
RUST_BACKTRACE: 1 | |
CARGO_TERM_COLOR: always | |
IGGY_CI_BUILD: true | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
sanity: | |
uses: ./.github/workflows/sanity.yml | |
build_and_test: | |
needs: sanity | |
name: ${{ matrix.platform.skip_tests == true && 'build' || 'build and test' }} ${{ matrix.platform.os_name }} | |
runs-on: ${{ matrix.platform.os }} | |
timeout-minutes: 45 | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- os_name: Linux-x86_64-musl | |
os: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
bin: | |
- iggy-server | |
- iggy-cli | |
name: iggy-Linux-x86_64-musl.tar.gz | |
cargo_command: cargo | |
docker_arch: linux/amd64 | |
cross: false | |
- os_name: Linux-arm | |
os: ubuntu-22.04 | |
target: arm-unknown-linux-musleabi | |
bin: | |
- iggy-server | |
- iggy-cli | |
name: iggy-Linux-arm-musl.tar.gz | |
docker_arch: linux/arm/v7 | |
cross: true | |
qemu_runner: "qemu-arm" | |
- os_name: Linux-aarch64-musl | |
os: ubuntu-latest | |
target: aarch64-unknown-linux-musl | |
bin: | |
- iggy-server | |
- iggy-cli | |
name: iggy-Linux-aarch64-musl.tar.gz | |
docker_arch: linux/arm64/v8 | |
cross: true | |
qemu_runner: "qemu-aarch64" | |
- os_name: macOS-aarch64 | |
os: macOS-latest | |
target: aarch64-apple-darwin | |
bin: | |
- iggy-server | |
- iggy-cli | |
name: iggy-Darwin-aarch64.tar.gz | |
skip_tests: true | |
cross: false | |
- os_name: Windows-x86_64 | |
os: windows-latest | |
target: x86_64-pc-windows-msvc | |
bin: | |
- iggy-server | |
- iggy-cli | |
name: iggy-Windows-x86_64.zip | |
skip_tests: true | |
cross: false | |
toolchain: | |
- stable | |
# - nightly | |
# - beta | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache cargo & target directories | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: "v2" | |
- name: Configure Git | |
run: | | |
git config --global user.email "jdoe@example.com" | |
git config --global user.name "J. Doe" | |
- name: Set environment variables | |
run: export QEMU_RUNNER=${{ matrix.platform.qemu_runner }} | |
if: ${{ matrix.platform.cross }} | |
- name: Install musl-tools on Linux | |
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools | |
if: contains(matrix.platform.name, 'musl') | |
- name: Build binary | |
uses: houseabsolute/actions-rust-cross@v0 | |
with: | |
command: "build" | |
target: ${{ matrix.platform.target }} | |
toolchain: ${{ matrix.toolchain }} | |
args: "--verbose" | |
- name: Run tests | |
uses: houseabsolute/actions-rust-cross@v0 | |
with: | |
command: "test" | |
target: ${{ matrix.platform.target }} | |
toolchain: ${{ matrix.toolchain }} | |
args: "--verbose" | |
if: ${{ !matrix.platform.skip_tests }} | |
- name: Check if workspace is clean | |
run: git status | grep "working tree clean" || { git status ; exit 1; } | |
if: runner.os != 'Windows' | |
finalize: | |
runs-on: ubuntu-latest | |
needs: build_and_test | |
if: always() | |
steps: | |
- name: Everything is fine | |
if: ${{ !(contains(needs.*.result, 'failure')) }} | |
run: exit 0 | |
- name: Some tests failed | |
if: ${{ contains(needs.*.result, 'failure') }} | |
run: exit 1 |