-
Notifications
You must be signed in to change notification settings - Fork 13
70 lines (63 loc) · 2.43 KB
/
nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Daily compatibility check against latest polkadot
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
nightly-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Free space on the runner
run: |
df -h
sudo apt -y autoremove --purge
sudo apt -y autoclean
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
- name: Cache Rust dependencies
uses: swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
cache-on-failure: true
- name: Run nightly tests
run: |
sudo apt install -y protobuf-compiler
rustup target add wasm32-unknown-unknown
rustup component add rust-src
git clone -b master --depth 1 https://github.com/paritytech/polkadot-sdk.git polkadot-sdk
cd polkadot-sdk
cargo build -p polkadot --release --features fast-runtime
mkdir -p ~/.local/bin
sudo mv ./target/release/polkadot /usr/bin
sudo mv ./target/release/polkadot-execute-worker /usr/bin
sudo mv ./target/release/polkadot-prepare-worker /usr/bin
polkadot --version
cd -
rm -rf polkadot
cd staking-miner-playground
cargo build --release --features test-trimming
sudo mv ./target/release/staking-miner-playground /usr/bin
staking-miner-playground --version
cd -
RUST_LOG=info cargo test --workspace --all-features -- --nocapture
cargo clean
- name: Create an issue on failure
if: failure()
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FAILED_WORKFLOW_RUN_URL: https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks/${{ github.run_id }}
with:
# Use this issue template:
filename: .github/issue_templates/nightly_run_failed.md
# Update existing issue if found; hopefully will make it clearer
# that it is still an issue:
update_existing: true
# Look for new *open* issues in this search (we want to
# create a new one if we only find closed versions):
search_existing: open