From f752c78a15139d1a960b45b644196b12d020a9f7 Mon Sep 17 00:00:00 2001 From: Stephen Akinyemi Date: Wed, 8 Jan 2025 01:13:17 +0100 Subject: [PATCH] ci: temporarily disable GitHub Actions workflows - Comment out release.yml workflow for package publishing - Comment out tests_and_checks.yml workflow for testing and linting - Preserve workflow configurations for future re-enablement These workflows are temporarily disabled. --- .github/workflows/release.yml | 132 ++++---- .github/workflows/tests_and_checks.yml | 450 ++++++++++++------------- 2 files changed, 291 insertions(+), 291 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 62e7bee..94396a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,75 +1,75 @@ -name: ๐Ÿš€ Release Packages & Binaries +# name: ๐Ÿš€ Release Packages & Binaries -on: - push: - branches: [ main ] - workflow_dispatch: - inputs: - run_publish_release: - description: 'Publish release' - type: boolean - required: true - default: false +# on: +# push: +# branches: [ main ] +# workflow_dispatch: +# inputs: +# run_publish_release: +# description: 'Publish release' +# type: boolean +# required: true +# default: false -permissions: - contents: write - pull-requests: write +# permissions: +# contents: write +# pull-requests: write -jobs: - release-please: - runs-on: ubuntu-latest - outputs: - releases_created: ${{ steps.release.outputs.releases_created }} - prs_created: ${{ steps.release.outputs.prs_created }} - tag_name: ${{ steps.release.outputs.tag_name }} - steps: - - name: Setup release-please - uses: googleapis/release-please-action@v4 - id: release - with: - token: ${{ secrets.GITHUB_TOKEN }} - config-file: release-please-config.json - manifest-file: .release-please-manifest.json +# jobs: +# release-please: +# runs-on: ubuntu-latest +# outputs: +# releases_created: ${{ steps.release.outputs.releases_created }} +# prs_created: ${{ steps.release.outputs.prs_created }} +# tag_name: ${{ steps.release.outputs.tag_name }} +# steps: +# - name: Setup release-please +# uses: googleapis/release-please-action@v4 +# id: release +# with: +# token: ${{ secrets.GITHUB_TOKEN }} +# config-file: release-please-config.json +# manifest-file: .release-please-manifest.json - - name: Check release status - run: | - echo "Release created: ${{ steps.release.outputs.releases_created }}" - echo "PRs created: ${{ steps.release.outputs.prs_created }}" - echo "monocore created: ${{ steps.release.outputs.monocore--releases_created }}" - echo "monofs created: ${{ steps.release.outputs.monofs--releases_created }}" - echo "monoutils-store created: ${{ steps.release.outputs.monoutils-store--releases_created }}" +# - name: Check release status +# run: | +# echo "Release created: ${{ steps.release.outputs.releases_created }}" +# echo "PRs created: ${{ steps.release.outputs.prs_created }}" +# echo "monocore created: ${{ steps.release.outputs.monocore--releases_created }}" +# echo "monofs created: ${{ steps.release.outputs.monofs--releases_created }}" +# echo "monoutils-store created: ${{ steps.release.outputs.monoutils-store--releases_created }}" - publish-release: - needs: - - release-please - if: ${{ needs.release-please.outputs.releases_created == 'true' || github.event.inputs.run_publish_release }} - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 +# publish-release: +# needs: +# - release-please +# if: ${{ needs.release-please.outputs.releases_created == 'true' || github.event.inputs.run_publish_release }} +# runs-on: ubuntu-latest +# steps: +# - name: Checkout code +# uses: actions/checkout@v4 - - name: Publish monoutils-store - working-directory: monoutils-store - env: - CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} - run: | - cargo publish -p monoutils-store +# - name: Publish monoutils-store +# working-directory: monoutils-store +# env: +# CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} +# run: | +# cargo publish -p monoutils-store - - name: Wait for crates.io index update - run: | - echo "Waiting for crates.io to update index..." - sleep 30 +# - name: Wait for crates.io index update +# run: | +# echo "Waiting for crates.io to update index..." +# sleep 30 - - name: Publish monofs - working-directory: monofs - env: - CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} - run: | - cargo publish -p monofs +# - name: Publish monofs +# working-directory: monofs +# env: +# CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} +# run: | +# cargo publish -p monofs - - name: Publish monocore - working-directory: monocore - env: - CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} - run: | - cargo publish -p monocore +# - name: Publish monocore +# working-directory: monocore +# env: +# CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} +# run: | +# cargo publish -p monocore diff --git a/.github/workflows/tests_and_checks.yml b/.github/workflows/tests_and_checks.yml index 8a57262..37ba1c4 100644 --- a/.github/workflows/tests_and_checks.yml +++ b/.github/workflows/tests_and_checks.yml @@ -1,225 +1,225 @@ -name: ๐Ÿงช Tests and Checks - -on: - push: - branches: [ main ] - pull_request: - branches: [ '**' ] - workflow_dispatch: - inputs: - force_build_libkrun: - description: 'Force build libkrun' - required: false - type: boolean - default: false - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - check-libkrun-cache-changes: - runs-on: ubuntu-latest - outputs: - should_build: ${{ steps.check_build.outputs.should_build }} - libkrun_hash: ${{ steps.hash_libkrun.outputs.hash }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - - name: Hash build_libkrun.sh - id: hash_libkrun - run: | - HASH=$(sha256sum build_libkrun.sh | awk '{ print $1 }') - echo "hash=$HASH" >> $GITHUB_OUTPUT - echo "Calculated hash: $HASH" - - - name: Check if cache exists - id: check_cache - uses: actions/cache/restore@v4 - with: - path: | - build/libkrunfw/libkrunfw*.so* - build/libkrun/target/release/libkrun*.so* - key: ${{ runner.os }}-libkrun-${{ steps.hash_libkrun.outputs.hash }} - - - name: Check if build is needed - id: check_build - run: | - if [ "${{ steps.check_cache.outputs.cache-hit }}" == 'true' ]; then - echo "Cache hit, no need to build" - echo "should_build=false" >> $GITHUB_OUTPUT - elif [ $(git rev-list --count HEAD) -lt 2 ]; then - echo "Only one commit in the repository, building libkrun" - echo "should_build=true" >> $GITHUB_OUTPUT - elif git diff --name-only HEAD^ HEAD | grep -qE 'build_libkrun.sh|.github/workflows/tests_and_checks.yml'; then - echo "build_libkrun.sh or workflow file has changed, building libkrun" - echo "should_build=true" >> $GITHUB_OUTPUT - else - echo "No relevant changes, no need to build" - echo "should_build=false" >> $GITHUB_OUTPUT - fi - - build-libkrun: - needs: check-libkrun-cache-changes - if: needs.check-libkrun-cache-changes.outputs.should_build == 'true' || github.event.inputs.force_build_libkrun == 'true' - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install Dependencies - run: | - sudo apt-get update -qqy - sudo apt-get install -y jq libelf-dev build-essential flex bison libssl-dev libncurses5-dev python3-pip - pip3 install --user pyelftools - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Build libkrun - run: | - ./build_libkrun.sh --no-cleanup --force-build - - - name: Cache libkrun - uses: actions/cache/save@v4 - with: - path: | - build/libkrunfw/libkrunfw*.so* - build/libkrun/target/release/libkrun*.so* - key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-cache-changes.outputs.libkrun_hash }} - - run-checks: - needs: [check-libkrun-cache-changes, build-libkrun] - if: always() - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - rust-toolchain: - - stable - - nightly - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Cache Project - uses: Swatinem/rust-cache@v2 - - - name: Restore libkrun cache - uses: actions/cache/restore@v4 - with: - path: | - build/libkrunfw/libkrunfw*.so* - build/libkrun/target/release/libkrun*.so* - key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-cache-changes.outputs.libkrun_hash }} - - - name: Install Rust Toolchain - uses: actions-rs/toolchain@v1 - with: - override: true - components: rustfmt, clippy - toolchain: ${{ matrix.rust-toolchain }} - - - name: Check Format - uses: actions-rs/cargo@v1 - with: - args: --all -- --check - command: fmt - toolchain: ${{ matrix.rust-toolchain }} - - - name: Run Linter - uses: actions-rs/cargo@v1 - with: - args: --all -- -D warnings - command: clippy - toolchain: ${{ matrix.rust-toolchain }} - - - name: Check Advisories - if: ${{ matrix.rust-toolchain == 'stable' }} - uses: EmbarkStudios/cargo-deny-action@v2 - with: - command: check advisories - continue-on-error: true - - - name: Check Bans, Licenses, and Sources - if: ${{ matrix.rust-toolchain == 'stable' }} - uses: EmbarkStudios/cargo-deny-action@v2 - with: - command: check bans licenses sources - - # A hack to make `ld` find the libkrunfw because right now it seems to only look for libkrunfw.so.x - # and not libkrunfw.so or libkrunfw.so.x.x.x even though their SONAME is libkrunfw.so.x - - name: Create symlinks - run: | - cd build/libkrunfw - objdump -p libkrunfw.so.4.4.2 | grep SONAME # sanity check - ln -sf libkrunfw.so.4.4.2 libkrunfw.so.4 - ln -sf libkrunfw.so.4 libkrunfw.so - - - name: Test Release - if: ${{ matrix.rust-toolchain == 'stable' && github.event_name == 'push' }} - run: | - LIBRARY_PATH=${{ github.workspace }}/build/libkrunfw:${{ github.workspace }}/build/libkrun/target/release:${{ env.LIBRARY_PATH }} \ - LD_LIBRARY_PATH=${{ github.workspace }}/build/libkrunfw:${{ github.workspace }}/build/libkrun/target/release:${{ env.LD_LIBRARY_PATH }} \ - cargo build --release - - run-tests: - needs: [check-libkrun-cache-changes, build-libkrun] - if: always() - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - rust-toolchain: - - stable - - nightly - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Install Environment Packages - run: | - sudo apt-get update -qqy - sudo apt-get install jq - - - name: Cache Project - uses: Swatinem/rust-cache@v2 - - - name: Restore libkrun cache - uses: actions/cache/restore@v4 - with: - path: | - build/libkrunfw/libkrunfw*.so* - build/libkrun/target/release/libkrun*.so* - key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-cache-changes.outputs.libkrun_hash }} - - - name: Print Cache - run: tree -L 2 build/ - - - name: Install Rust Toolchain - uses: actions-rs/toolchain@v1 - with: - override: true - toolchain: ${{ matrix.rust-toolchain }} - - # A hack to make `ld` find the libkrunfw because right now it seems to only look for libkrunfw.so.x - # and not libkrunfw.so or libkrunfw.so.x.x.x even though their SONAME is libkrunfw.so.x - - name: Create symlinks - run: | - cd build/libkrunfw - objdump -p libkrunfw.so.4.4.2 | grep SONAME # sanity check - ln -sf libkrunfw.so.4.4.2 libkrunfw.so.4 - ln -sf libkrunfw.so.4 libkrunfw.so - - - name: Run Tests - run: | - sudo -E bash -c 'export LIBRARY_PATH=${{ github.workspace }}/build/libkrunfw:${{ github.workspace }}/build/libkrun/target/release && \ - export LD_LIBRARY_PATH=${{ github.workspace }}/build/libkrunfw:${{ github.workspace }}/build/libkrun/target/release && \ - /home/runner/.cargo/bin/cargo test && \ - /home/runner/.cargo/bin/cargo test -- --ignored' +# name: ๐Ÿงช Tests and Checks + +# on: +# push: +# branches: [ main ] +# pull_request: +# branches: [ '**' ] +# workflow_dispatch: +# inputs: +# force_build_libkrun: +# description: 'Force build libkrun' +# required: false +# type: boolean +# default: false + +# concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true + +# jobs: +# check-libkrun-cache-changes: +# runs-on: ubuntu-latest +# outputs: +# should_build: ${{ steps.check_build.outputs.should_build }} +# libkrun_hash: ${{ steps.hash_libkrun.outputs.hash }} +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 2 + +# - name: Hash build_libkrun.sh +# id: hash_libkrun +# run: | +# HASH=$(sha256sum build_libkrun.sh | awk '{ print $1 }') +# echo "hash=$HASH" >> $GITHUB_OUTPUT +# echo "Calculated hash: $HASH" + +# - name: Check if cache exists +# id: check_cache +# uses: actions/cache/restore@v4 +# with: +# path: | +# build/libkrunfw/libkrunfw*.so* +# build/libkrun/target/release/libkrun*.so* +# key: ${{ runner.os }}-libkrun-${{ steps.hash_libkrun.outputs.hash }} + +# - name: Check if build is needed +# id: check_build +# run: | +# if [ "${{ steps.check_cache.outputs.cache-hit }}" == 'true' ]; then +# echo "Cache hit, no need to build" +# echo "should_build=false" >> $GITHUB_OUTPUT +# elif [ $(git rev-list --count HEAD) -lt 2 ]; then +# echo "Only one commit in the repository, building libkrun" +# echo "should_build=true" >> $GITHUB_OUTPUT +# elif git diff --name-only HEAD^ HEAD | grep -qE 'build_libkrun.sh|.github/workflows/tests_and_checks.yml'; then +# echo "build_libkrun.sh or workflow file has changed, building libkrun" +# echo "should_build=true" >> $GITHUB_OUTPUT +# else +# echo "No relevant changes, no need to build" +# echo "should_build=false" >> $GITHUB_OUTPUT +# fi + +# build-libkrun: +# needs: check-libkrun-cache-changes +# if: needs.check-libkrun-cache-changes.outputs.should_build == 'true' || github.event.inputs.force_build_libkrun == 'true' +# runs-on: ubuntu-latest +# steps: +# - name: Checkout repository +# uses: actions/checkout@v4 + +# - name: Install Dependencies +# run: | +# sudo apt-get update -qqy +# sudo apt-get install -y jq libelf-dev build-essential flex bison libssl-dev libncurses5-dev python3-pip +# pip3 install --user pyelftools + +# - name: Install Rust +# uses: actions-rs/toolchain@v1 +# with: +# profile: minimal +# toolchain: stable +# override: true + +# - name: Build libkrun +# run: | +# ./build_libkrun.sh --no-cleanup --force-build + +# - name: Cache libkrun +# uses: actions/cache/save@v4 +# with: +# path: | +# build/libkrunfw/libkrunfw*.so* +# build/libkrun/target/release/libkrun*.so* +# key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-cache-changes.outputs.libkrun_hash }} + +# run-checks: +# needs: [check-libkrun-cache-changes, build-libkrun] +# if: always() +# runs-on: ubuntu-latest +# strategy: +# fail-fast: false +# matrix: +# rust-toolchain: +# - stable +# - nightly +# steps: +# - name: Checkout Repository +# uses: actions/checkout@v4 + +# - name: Cache Project +# uses: Swatinem/rust-cache@v2 + +# - name: Restore libkrun cache +# uses: actions/cache/restore@v4 +# with: +# path: | +# build/libkrunfw/libkrunfw*.so* +# build/libkrun/target/release/libkrun*.so* +# key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-cache-changes.outputs.libkrun_hash }} + +# - name: Install Rust Toolchain +# uses: actions-rs/toolchain@v1 +# with: +# override: true +# components: rustfmt, clippy +# toolchain: ${{ matrix.rust-toolchain }} + +# - name: Check Format +# uses: actions-rs/cargo@v1 +# with: +# args: --all -- --check +# command: fmt +# toolchain: ${{ matrix.rust-toolchain }} + +# - name: Run Linter +# uses: actions-rs/cargo@v1 +# with: +# args: --all -- -D warnings +# command: clippy +# toolchain: ${{ matrix.rust-toolchain }} + +# - name: Check Advisories +# if: ${{ matrix.rust-toolchain == 'stable' }} +# uses: EmbarkStudios/cargo-deny-action@v2 +# with: +# command: check advisories +# continue-on-error: true + +# - name: Check Bans, Licenses, and Sources +# if: ${{ matrix.rust-toolchain == 'stable' }} +# uses: EmbarkStudios/cargo-deny-action@v2 +# with: +# command: check bans licenses sources + +# # A hack to make `ld` find the libkrunfw because right now it seems to only look for libkrunfw.so.x +# # and not libkrunfw.so or libkrunfw.so.x.x.x even though their SONAME is libkrunfw.so.x +# - name: Create symlinks +# run: | +# cd build/libkrunfw +# objdump -p libkrunfw.so.4.4.2 | grep SONAME # sanity check +# ln -sf libkrunfw.so.4.4.2 libkrunfw.so.4 +# ln -sf libkrunfw.so.4 libkrunfw.so + +# - name: Test Release +# if: ${{ matrix.rust-toolchain == 'stable' && github.event_name == 'push' }} +# run: | +# LIBRARY_PATH=${{ github.workspace }}/build/libkrunfw:${{ github.workspace }}/build/libkrun/target/release:${{ env.LIBRARY_PATH }} \ +# LD_LIBRARY_PATH=${{ github.workspace }}/build/libkrunfw:${{ github.workspace }}/build/libkrun/target/release:${{ env.LD_LIBRARY_PATH }} \ +# cargo build --release + +# run-tests: +# needs: [check-libkrun-cache-changes, build-libkrun] +# if: always() +# runs-on: ubuntu-latest +# strategy: +# fail-fast: false +# matrix: +# rust-toolchain: +# - stable +# - nightly +# steps: +# - name: Checkout Repository +# uses: actions/checkout@v4 + +# - name: Install Environment Packages +# run: | +# sudo apt-get update -qqy +# sudo apt-get install jq + +# - name: Cache Project +# uses: Swatinem/rust-cache@v2 + +# - name: Restore libkrun cache +# uses: actions/cache/restore@v4 +# with: +# path: | +# build/libkrunfw/libkrunfw*.so* +# build/libkrun/target/release/libkrun*.so* +# key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-cache-changes.outputs.libkrun_hash }} + +# - name: Print Cache +# run: tree -L 2 build/ + +# - name: Install Rust Toolchain +# uses: actions-rs/toolchain@v1 +# with: +# override: true +# toolchain: ${{ matrix.rust-toolchain }} + +# # A hack to make `ld` find the libkrunfw because right now it seems to only look for libkrunfw.so.x +# # and not libkrunfw.so or libkrunfw.so.x.x.x even though their SONAME is libkrunfw.so.x +# - name: Create symlinks +# run: | +# cd build/libkrunfw +# objdump -p libkrunfw.so.4.4.2 | grep SONAME # sanity check +# ln -sf libkrunfw.so.4.4.2 libkrunfw.so.4 +# ln -sf libkrunfw.so.4 libkrunfw.so + +# - name: Run Tests +# run: | +# sudo -E bash -c 'export LIBRARY_PATH=${{ github.workspace }}/build/libkrunfw:${{ github.workspace }}/build/libkrun/target/release && \ +# export LD_LIBRARY_PATH=${{ github.workspace }}/build/libkrunfw:${{ github.workspace }}/build/libkrun/target/release && \ +# /home/runner/.cargo/bin/cargo test && \ +# /home/runner/.cargo/bin/cargo test -- --ignored'