From e8c69abb8447cc34cb1269130ca55bc8fa58e3f5 Mon Sep 17 00:00:00 2001 From: Anton Yemelyanov Date: Sat, 3 Aug 2024 04:05:42 +0300 Subject: [PATCH] ci --- .github/workflows/ci.yaml | 64 +++------------------------------------ 1 file changed, 5 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f745e61..d749694 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,43 +41,6 @@ jobs: # matrix: # os: [ ubuntu-latest, macos-latest, windows-latest ] steps: - # Clean unnecessary files to save disk space - - name: clean unnecessary files to save space - run: | - docker rmi `docker images -q` - sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/sudo apt/sources.list.d - sudo apt -y autoremove --purge - sudo apt -y autoclean - sudo apt clean - rm --recursive --force "$AGENT_TOOLSDIRECTORY" - df -h - - # remove large packages manually (all but llvm) - sudo apt-get remove -y '^aspnetcore-.*' || echo "::warning::The command [sudo apt-get remove -y '^aspnetcore-.*'] failed to complete successfully. Proceeding..." - sudo apt-get remove -y '^dotnet-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^dotnet-.*' --fix-missing] failed to complete successfully. Proceeding..." - sudo apt-get remove -y 'php.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y 'php.*' --fix-missing] failed to complete successfully. Proceeding..." - sudo apt-get remove -y '^mongodb-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mongodb-.*' --fix-missing] failed to complete successfully. Proceeding..." - sudo apt-get remove -y '^mysql-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mysql-.*' --fix-missing] failed to complete successfully. Proceeding..." - sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..." - sudo apt-get remove -y google-cloud-sdk --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-sdk --fix-missing] failed to complete successfully. Proceeding..." - sudo apt-get remove -y google-cloud-cli --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-cli --fix-missing] failed to complete successfully. Proceeding..." - sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed to complete successfully. Proceeding..." - sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed to complete successfully. Proceeding..." - df -h - - # Free up disk space on Ubuntu - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - # This might remove tools that are actually needed, if set to "true" but frees about 6 GB - tool-cache: false - - # large packages, except llvm, are removed manually during the previous step - # see: https://github.com/jlumbroso/free-disk-space/issues/6 - # TODO: use the discussed whitelist feature when available - large-packages: false - - swap-storage: true - name: Checkout sources uses: actions/checkout@v4 @@ -111,8 +74,8 @@ jobs: target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Run cargo build with devnet-prealloc feature - run: cargo build --release --features devnet-prealloc --workspace --all --tests --benches + - name: Run cargo build + run: cargo build --release --workspace --all --tests --benches - name: Run cargo test regular features run: cargo nextest run --release --workspace @@ -120,12 +83,6 @@ jobs: - name: Run cargo doc tests run: cargo test --doc --release --workspace - - name: Run cargo test on kaspa-hashes without asm - run: cargo nextest run --release -p kaspa-hashes --features=no-asm --benches - - - name: Run cargo doc tests with features=no-asm on kaspa-hashes - run: cargo test --doc --release -p kaspa-hashes --features=no-asm - lints: name: Lints runs-on: ubuntu-latest @@ -213,16 +170,8 @@ jobs: target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # append here any new wasm32 crate not already covered by the existing checks - - - name: Run cargo check of kaspa-wrpc-wasm for wasm32 target - run: cargo clippy -p kaspa-wrpc-wasm --target wasm32-unknown-unknown - - - name: Run cargo check of kaspa-wallet-cli-wasm for wasm32 target - run: cargo clippy -p kaspa-wallet-cli-wasm --target wasm32-unknown-unknown - - name: Run cargo check of kaspa-wasm for wasm32 target - run: cargo clippy -p kaspa-wasm --target wasm32-unknown-unknown + run: cargo clippy --target wasm32-unknown-unknown build-wasm32: name: Build WASM32 SDK @@ -293,15 +242,12 @@ jobs: - name: Build wasm release run: | - pushd . - cd wasm bash build-release - popd - mv wasm/release/kaspa-wasm32-sdk.zip wasm/release/kaspa-wasm32-sdk-${{ env.SHORT_SHA }}.zip + mv release/kaspa-wasm32-sdk.zip release/kaspa-wasm32-sdk-${{ env.SHORT_SHA }}.zip - name: Upload WASM build to GitHub uses: actions/upload-artifact@v4 with: name: kaspa-wasm32-sdk-${{ env.SHORT_SHA }} - path: wasm/release/kaspa-wasm32-sdk-${{ env.SHORT_SHA }}.zip + path: release/kaspa-wasm32-sdk-${{ env.SHORT_SHA }}.zip