diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml deleted file mode 100644 index 1e1759884..000000000 --- a/.github/workflows/benchmarks.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Benchmarks - -# spell-checker:ignore codspeed dtolnay Swatinem - -on: - pull_request: - push: - branches: - - '*' - -permissions: - contents: read # to fetch code (actions/checkout) - -# End the current execution if there is a new changeset in the PR. -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -jobs: - benchmarks: - name: Run ${{ matrix.mode }} benchmarks (CodSpeed) - runs-on: ubuntu-latest - strategy: - matrix: - mode: - - simulation - - memory - steps: - - uses: actions/checkout@v6 - with: - persist-credentials: false - - - uses: dtolnay/rust-toolchain@stable - - - uses: Swatinem/rust-cache@v2 - - - name: Install cargo-codspeed - shell: bash - run: cargo install cargo-codspeed --locked - - - name: Build benchmarks - shell: bash - run: cargo codspeed build - - - name: Run benchmarks - uses: CodSpeedHQ/action@v4 - env: - CODSPEED_LOG: debug - with: - mode: ${{ matrix.mode }} - run: cargo codspeed run > /dev/null - token: ${{ secrets.CODSPEED_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0166bb6b1..bd47b015d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,14 +118,8 @@ jobs: rustc: beta notest_cuda_compilers: clang++ extra_desc: cuda12.8 - no_coverage: true env: RUST_BACKTRACE: 1 - COVERAGE_REPORT_DIR: "target/debug" - COVERAGE_REPORT_FILE: "target/debug/lcov.info" - BINARY_DIR: "target/debug" - GRCOV_IGNORE_OPTION: '--ignore build.rs --ignore "/*" --ignore "[a-zA-Z]:/*"' - GRCOV_EXCLUDE_OPTION: '--excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"' NOTEST_CUDA_COMPILERS: ${{ matrix.notest_cuda_compilers || '' }} CARGO_PROFILE_DEV_DEBUG: '0' # save disk space steps: @@ -139,7 +133,6 @@ jobs: uses: ./.github/actions/rust-toolchain with: toolchain: ${{ matrix.rustc }} - components: llvm-tools-preview - if: ${{ contains(matrix.os, 'ubuntu') }} name: Install gcc & clang for tests @@ -164,39 +157,6 @@ jobs: with: cuda-version: ${{ matrix.cuda }} - - name: "`grcov` ~ install" - if: ${{ ! matrix.no_coverage }} - shell: bash - run: | - GRCOV_VERSION="0.10.7" - if [[ "$RUNNER_OS" == "Windows" ]]; then - TARGET="x86_64-pc-windows-msvc" - EXT="zip" - elif [[ "$RUNNER_OS" == "macOS" && "$RUNNER_ARCH" == "ARM64" ]]; then - TARGET="aarch64-apple-darwin" - EXT="tar.bz2" - elif [[ "$RUNNER_OS" == "macOS" ]]; then - TARGET="x86_64-apple-darwin" - EXT="tar.bz2" - else - TARGET="x86_64-unknown-linux-musl" - EXT="tar.bz2" - fi - URL="https://github.com/mozilla/grcov/releases/download/v${GRCOV_VERSION}/grcov-${TARGET}.${EXT}" - curl -sL "$URL" -o "grcov.${EXT}" - if [[ "$EXT" == "zip" ]]; then - unzip -q "grcov.${EXT}" -d "$HOME/.cargo/bin/" - else - tar -xjf "grcov.${EXT}" -C "$HOME/.cargo/bin/" - fi - - - name: Create config for testing - if: ${{ ! matrix.no_coverage }} - run: | - mkdir -p .cargo - echo '[env] - LLVM_PROFILE_FILE = { value = "target/debug/coverage/default-%p-%8m.profraw", relative = true }' >> .cargo/config.toml - - if: ${{ matrix.cuda != '' && runner.os == 'Linux' }} name: Free disk space for CUDA tests run: | @@ -208,7 +168,6 @@ jobs: env: CARGO_INCREMENTAL: "0" RUSTC_WRAPPER: "" - RUSTFLAGS: "-Cinstrument-coverage -Ccodegen-units=1 -Copt-level=0 -Coverflow-checks=off" - name: Upload failure if: failure() @@ -216,37 +175,6 @@ jobs: with: name: test-${{ matrix.os }}-${{ matrix.rustc || 'stable' }}-${{ matrix.extra_desc }} - # coverage: - - name: Display coverage files - if: ${{ ! matrix.no_coverage }} - shell: bash - run: - grcov . -s . --binary-path $BINARY_DIR --output-type files $GRCOV_IGNORE_OPTION $GRCOV_EXCLUDE_OPTION | sort --unique - - - name: Generate coverage data (via `grcov`) - if: ${{ ! matrix.no_coverage }} - id: coverage - shell: bash - run: | - mkdir -p "${COVERAGE_REPORT_DIR}" - grcov . -s . --binary-path $BINARY_DIR --output-type lcov --output-path "${COVERAGE_REPORT_FILE}" --branch $GRCOV_IGNORE_OPTION $GRCOV_EXCLUDE_OPTION - echo "report=${COVERAGE_REPORT_FILE}" >> $GITHUB_OUTPUT - - - name: Upload coverage results (to Codecov.io) - if: ${{ ! matrix.no_coverage }} - uses: codecov/codecov-action@v5 - with: - files: ${{ steps.coverage.outputs.report }} - ## flags: IntegrationTests, UnitTests, ${{ steps.vars.outputs.CODECOV_FLAGS }} - flags: ${{ steps.vars.outputs.CODECOV_FLAGS }} - name: codecov-umbrella-${{ matrix.os }}-rust_${{ matrix.rustc || 'stable' }}-${{ matrix.extra_desc }} - fail_ci_if_error: true - # verbose: true - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - - build: name: build ${{ matrix.binary || 'sccache' }} ${{ matrix.target }} runs-on: ${{ matrix.os }} @@ -259,16 +187,7 @@ jobs: - os: ubuntu-22.04 target: x86_64-unknown-linux-musl container: '{"image": "messense/rust-musl-cross:x86_64-musl"}' - - os: ubuntu-22.04 - target: s390x-unknown-linux-musl - container: '{"image": "messense/rust-musl-cross:s390x-musl"}' - lto: "false" - - os: ubuntu-22.04 - target: s390x-unknown-linux-gnu - - os: ubuntu-22.04 - target: riscv64gc-unknown-linux-musl - container: '{"image": "messense/rust-musl-cross:riscv64gc-musl"}' - lto: "false" + # s390x, riscv64, armv7, i686 removed from Vercel fork (aws-lc-sys cross-compilation issues) - os: ubuntu-22.04 binary: sccache-dist extra_args: --no-default-features --features="dist-server" @@ -277,12 +196,6 @@ jobs: - os: ubuntu-22.04 target: aarch64-unknown-linux-musl container: '{"image": "messense/rust-musl-cross:aarch64-musl"}' - - os: ubuntu-22.04 - target: armv7-unknown-linux-musleabi - container: '{"image": "messense/rust-musl-cross:armv7-musleabi"}' - - os: ubuntu-22.04 - target: i686-unknown-linux-musl - container: '{"image": "messense/rust-musl-cross:i686-musl"}' - os: macos-14 target: aarch64-apple-darwin macosx_deployment_target: 11.0 @@ -306,48 +219,7 @@ jobs: target: ${{ matrix.target }} if: ${{ !matrix.container }} - - name: Install s390x cross-compilation toolchain - if: ${{ matrix.target == 's390x-unknown-linux-gnu' }} - run: | - sudo apt-get update - sudo apt-get install -y gcc-s390x-linux-gnu g++-s390x-linux-gnu - mkdir -p .cargo - cat >> .cargo/config.toml <> $GITHUB_ENV - echo CXXFLAGS="$CFLAGS" >> $GITHUB_ENV - echo RUSTFLAGS="-C target-cpu=z10" >> $GITHUB_ENV - - - name: Build (s390x-musl with build-std) - if: ${{ matrix.target == 's390x-unknown-linux-musl' }} - run: cargo +nightly build --locked --release --bin ${{ matrix.binary || 'sccache' }} --target ${{ matrix.target }} --features=openssl/vendored ${{ matrix.extra_args }} -Zbuild-std - env: - MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }} - DEVELOPER_DIR: ${{ matrix.developer_dir }} - SDKROOT: ${{ matrix.sdkroot }} - RUSTFLAGS: ${{ env.RUSTFLAGS || matrix.rustflags }} - CARGO_PROFILE_RELEASE_LTO: ${{ matrix.lto || 'true' }} - - name: Build - if: ${{ matrix.target != 's390x-unknown-linux-musl' }} run: cargo build --locked --release --bin ${{ matrix.binary || 'sccache' }} --target ${{ matrix.target }} --features=openssl/vendored ${{ matrix.extra_args }} env: MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }} @@ -372,67 +244,7 @@ jobs: if-no-files-found: error - test_freebsd: - name: test freebsd-15.0 rust stable - runs-on: ${{ matrix.job.os }} - timeout-minutes: 70 - strategy: - fail-fast: false - matrix: - job: - - { os: ubuntu-22.04 } - steps: - - uses: actions/checkout@v5 - - name: Prepare, build and test - uses: vmactions/freebsd-vm@v1 - with: - mem: 8192 - usesh: true - sync: rsync - copyback: false - prepare: pkg install -y ca_root_nss curl gmake gtar pot sudo - run: | - ##################################################################################### - ### Prepare, build, and test - ##################################################################################### - ### based on ref: - ### and on ref: - ### * NOTE: All steps need to be run in this block, otherwise, we are operating back - ### on the mac host. - set -exo pipefail - # - ### Basic user setup ################################################################ - TEST_USER=tester - TEST_USER_HOME="/opt/$TEST_USER" - REPO_NAME=${GITHUB_WORKSPACE##*/} - WORKSPACE_PARENT="/home/runner/work/${REPO_NAME}" - WORKSPACE="${WORKSPACE_PARENT}/${REPO_NAME}" - export WORKSPACE - # - mkdir -p "$TEST_USER_HOME" - pw adduser -n "$TEST_USER" -d "$TEST_USER_HOME" -c "Tester" -h - - chown -R "$TEST_USER":"$TEST_USER" "$TEST_USER_HOME" - chown -R "$TEST_USER":"$TEST_USER" "/$WORKSPACE_PARENT"/ - cat > /usr/local/etc/sudoers.d/wheel<> $GITHUB_PATH - - - name: Install rust - uses: ./.github/actions/rust-toolchain - with: - toolchain: "stable" - - - name: Build & setup librandomize_readdir - run: | - cargo build -p randomize_readdir - - - uses: actions/download-artifact@v8 - with: - name: integration-tests - path: /home/runner/.cargo/bin/ - - name: Chmod for binary - run: chmod +x ${SCCACHE_PATH} - - # Ensure that HIPCC isn't already borken - - name: Sanity Check - run: | - export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so - hipcc -o vectoradd_hip --offload-arch=gfx900 tests/integration/cmake-hip/vectoradd_hip.cpp - - - name: Test - run: | - export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so - rm "$RANDOMIZE_READDIR_LOG".* - cmake -B build -S tests/integration/cmake-hip -DCMAKE_HIP_COMPILER_LAUNCHER=${SCCACHE_PATH} -DCMAKE_HIP_ARCHITECTURES=gfx900 - cmake --build build - if ! grep -q bitcode "$RANDOMIZE_READDIR_LOG".*; then - echo "amdgcn bitcode not accessed, is librandomize_readdir properly set up?" - exit 1 - fi - - - name: Output - run: | - export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so - ${SCCACHE_PATH} --show-stats - - - name: Test Twice for Cache Read - run: | - export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so - rm "$RANDOMIZE_READDIR_LOG".* - rm -rf build - cmake -B build -S tests/integration/cmake-hip -DCMAKE_HIP_COMPILER_LAUNCHER=${SCCACHE_PATH} -DCMAKE_HIP_ARCHITECTURES=gfx900 - cmake --build build - if ! grep -q bitcode "$RANDOMIZE_READDIR_LOG".*; then - echo "amdgcn bitcode not accessed, is librandomize_readdir properly set up?" - exit 1 - fi - - - name: Output - run: | - export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so - ${SCCACHE_PATH} --show-stats - ${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]" - - xcode: - runs-on: macos-latest - env: - SCCACHE_PATH: target/debug/sccache - steps: - - name: Clone repository - uses: actions/checkout@v5 - - - name: Install rust - uses: ./.github/actions/rust-toolchain - with: - toolchain: "stable" - - - name: Build sccache - run: | - cargo build - - - name: Start server - run: ${SCCACHE_PATH} --start-server - - - name: Test compile xcode - working-directory: tests/integration/xcode - run: | - xcodebuild -version - xcodebuild -xcconfig sccache.xcconfig - - - name: Output - run: | - ${SCCACHE_PATH} --show-stats - - - name: Test compile xcode cached - working-directory: tests/integration/xcode - run: | - xcodebuild clean - xcodebuild -xcconfig sccache.xcconfig - - - name: Output - run: | - ${SCCACHE_PATH} --show-stats - ${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]" diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml deleted file mode 100644 index 8d0daabfe..000000000 --- a/.github/workflows/snap.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Snap - -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - -jobs: - Snap: - runs-on: ubuntu-latest - - timeout-minutes: 45 - - steps: - - name: Check out code - uses: actions/checkout@v5 - with: - fetch-depth: 0 # needed for version determination - - - name: Build and publish the snap - uses: canonical/actions/build-snap@release - with: - snapcraft-channel: edge - review-opts: --allow-classic - snapcraft-token: ${{ secrets.SNAPCRAFT_TOKEN }} - publish: ${{ github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name }} - publish-channel: edge/pr${{ github.event.number }}