name: ci_unit_tests_macos
concurrency:
group: ci_unit_tests_macos-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: ['**']
merge_group: {}
workflow_dispatch: {}
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUSTFLAGS: -D warnings
jobs:
ci_unit_tests_macos:
name: ci_unit_tests_macos
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: macos-15
steps:
- name: Free up disk space
run: |
sudo rm -rf /Applications/Xcode_*.app
sudo rm -rf /usr/local/lib/android
brew cleanup
- name: Install nextest
uses: taiki-e/install-action@nextest
- uses: actions/checkout@v4
- name: Cache cargo target
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/rc/'))
uses: actions/cache@v4
with:
path: target
key: ci-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
ci-${{ runner.os }}-cargo-
- name: Run unit tests
run: make test
shell: bash
env:
CKB_FEATURES: deadlock_detection,with_sentry,portable
- name: Disk usage summary
if: always() && (github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/rc/')))
run: |
echo "=== Disk Space Summary ==="
df -h
echo ""
echo "=== Target Directory Usage ==="
du -sh target/ 2>/dev/null || echo "target/ directory not found"
du -sh target/*/ 2>/dev/null || echo "No subdirectories in target/"