| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| # |
| # ------------------------------------------------------------- |
| # |
| # CI Test Rust Optional Workflow |
| # |
| # This workflow runs tests for Rust code on aarch64-apple-darwin target and generates coverage report. |
| # This workflow is optional and can be triggered manually or by other workflows. |
| # |
| name: ci-test-rust-optional |
| |
| on: |
| workflow_dispatch: |
| workflow_call: |
| |
| env: |
| RUST_BACKTRACE: 1 |
| CARGO_TERM_COLOR: always |
| IGGY_CI_BUILD: true |
| |
| jobs: |
| ci-coverage-rust: |
| name: ci-coverage-rust |
| uses: ./.github/workflows/ci-coverage-rust.yml |
| |
| aarch64-apple-darwin: |
| name: aarch64-apple-darwin |
| runs-on: macos-latest |
| timeout-minutes: 30 |
| steps: |
| - name: Checkout code |
| uses: actions/checkout@v4 |
| - name: Cache cargo & target directories |
| uses: Swatinem/rust-cache@v2 |
| with: |
| key: "aarch64-apple-darwin" |
| - name: Prepare aarch64-apple-darwin toolchain |
| uses: actions-rs/toolchain@v1 |
| with: |
| toolchain: stable |
| override: true |
| target: aarch64-apple-darwin |
| - name: Set verbose flag |
| shell: bash |
| run: echo "VERBOSE_FLAG=$([[ "${RUNNER_DEBUG}" = "1" ]] && echo "--verbose" || echo "")" >> $GITHUB_ENV |
| - name: Build binary |
| run: cargo build ${{ env.VERBOSE_FLAG }} --target aarch64-apple-darwin |
| - name: Run tests |
| run: cargo test ${{ env.VERBOSE_FLAG }} --target aarch64-apple-darwin |
| - name: Check if workspace is clean |
| run: git status | grep "working tree clean" || { git status ; exit 1; } |