Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
aspect committed Aug 3, 2024
1 parent 09419ca commit e8c69ab
Showing 1 changed file with 5 additions and 59 deletions.
64 changes: 5 additions & 59 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -111,21 +74,15 @@ 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

- 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit e8c69ab

Please sign in to comment.