diff --git a/.github/workflows/CI_rs.yml b/.github/workflows/CI_rs.yml index 136d0fec..662ca621 100644 --- a/.github/workflows/CI_rs.yml +++ b/.github/workflows/CI_rs.yml @@ -33,33 +33,34 @@ jobs: - name: Run clippy run: cargo clippy --workspace --all-targets -- -D warnings - test: - name: Test - runs-on: ubuntu-22.04 - env: - # CI release tests don't need DWARF debug info, and disabling it keeps - # target artifacts small enough to avoid runner disk exhaustion on cache misses. - CARGO_PROFILE_RELEASE_DEBUG: 0 - steps: - - uses: actions/checkout@v4 + # testジョブ全体を無効化 + # test: + # name: Test + # runs-on: ubuntu-22.04 + # env: + # # CI release tests don't need DWARF debug info, and disabling it keeps + # # target artifacts small enough to avoid runner disk exhaustion on cache misses. + # CARGO_PROFILE_RELEASE_DEBUG: 0 + # steps: + # - uses: actions/checkout@v4 - - name: Install HDF5 - run: sudo apt-get update && sudo apt-get install -y libhdf5-dev + # - name: Install HDF5 + # run: sudo apt-get update && sudo apt-get install -y libhdf5-dev - - name: Install Rust - uses: dtolnay/rust-toolchain@stable + # - name: Install Rust + # uses: dtolnay/rust-toolchain@stable - - uses: taiki-e/install-action@nextest + # - uses: taiki-e/install-action@nextest - - uses: Swatinem/rust-cache@v2 + # - uses: Swatinem/rust-cache@v2 - # tensor4all-hdf5 is kept out of nextest because its dlopen-based tests - # fail under nextest's per-process execution model. - - name: Run tests (non-HDF5) - run: cargo nextest run --release --workspace --exclude tensor4all-hdf5 + # # tensor4all-hdf5 is kept out of nextest because its dlopen-based tests + # # fail under nextest's per-process execution model. + # - name: Run tests (non-HDF5) + # run: cargo nextest run --release --workspace --exclude tensor4all-hdf5 - - name: Run HDF5 tests - run: cargo test --release -p tensor4all-hdf5 + # - name: Run HDF5 tests + # run: cargo test --release -p tensor4all-hdf5 coverage: name: Coverage @@ -86,7 +87,7 @@ jobs: runs-on: ubuntu-latest needs: - lint - - test + #- test - coverage if: always() steps: diff --git a/.github/workflows/CI_rs_selfhost.yml b/.github/workflows/CI_rs_selfhost.yml new file mode 100644 index 00000000..8eb01e01 --- /dev/null +++ b/.github/workflows/CI_rs_selfhost.yml @@ -0,0 +1,66 @@ +name: CI_rs_selfhost + +on: + pull_request: + branches: [main] + +permissions: + contents: read + +concurrency: + group: ci-pr-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + # fork からの PR: GitHub-hosted runner で通常 CI + ci-fork: + name: CI (fork PR / github-hosted) + if: github.event.pull_request.head.repo.full_name != github.repository + runs-on: ubuntu-22.04 + env: + # CI release tests don't need DWARF debug info, and disabling it keeps + # target artifacts small enough to avoid runner disk exhaustion on cache misses. + CARGO_PROFILE_RELEASE_DEBUG: 0 + steps: + - uses: actions/checkout@v6 + + - name: Install HDF5 + run: sudo apt-get update && sudo apt-get install -y libhdf5-dev + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - uses: taiki-e/install-action@nextest + + - uses: Swatinem/rust-cache@v2 + + # tensor4all-hdf5 is kept out of nextest because its dlopen-based tests + # fail under nextest's per-process execution model. + - name: Run tests (non-HDF5) + run: cargo nextest run --release --workspace --exclude tensor4all-hdf5 + + - name: Run HDF5 tests + run: cargo test --release -p tensor4all-hdf5 + + # PRs from the same repository: run heavy CI on self-hosted runner + ci-maintainer: + name: CI (same-repo PR / self-hosted heavy) + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: [self-hosted, linux, x64] + env: + CARGO_TARGET_DIR: ${{ github.workspace }}/../target + CARGO_PROFILE_RELEASE_DEBUG: 0 + steps: + - name: Checkout + uses: actions/checkout@v6 + + # 必要に応じてセットアップを追加 + - uses: dtolnay/rust-toolchain@stable + + - uses: taiki-e/install-action@nextest + + - name: Run tests (non-HDF5) + run: cargo nextest run --release --workspace --exclude tensor4all-hdf5 + + - name: Run HDF5 tests + run: cargo test --release -p tensor4all-hdf5