|
| 1 | +name: ci |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + tags: |
| 8 | + - '*' |
| 9 | + pull_request: |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: write |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + steps: |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@v3 |
| 20 | + - name: Remove unnecessary files |
| 21 | + run: | |
| 22 | + docker rmi `docker images -q` |
| 23 | + sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/sudo apt/sources.list.d |
| 24 | + sudo apt -y autoremove --purge |
| 25 | + sudo apt -y autoclean |
| 26 | + sudo apt clean |
| 27 | + rm -rf "$AGENT_TOOLSDIRECTORY" |
| 28 | + df -h |
| 29 | + - name: Free Disk Space (Ubuntu) |
| 30 | + uses: jlumbroso/free-disk-space@main |
| 31 | + with: |
| 32 | + tool-cache: true |
| 33 | + large-packages: true |
| 34 | + swap-storage: true |
| 35 | + - name: Install protoc |
| 36 | + uses: arduino/setup-protoc@v1 |
| 37 | + with: |
| 38 | + version: '3.x' |
| 39 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 40 | + - name: Install Rust |
| 41 | + uses: dtolnay/rust-toolchain@stable |
| 42 | + |
| 43 | + - uses: Swatinem/rust-cache@v2 |
| 44 | + |
| 45 | + - name: Build binaries |
| 46 | + run: cargo build --all --tests --all-features |
| 47 | + |
| 48 | + - uses: Swatinem/rust-cache@v2 |
| 49 | + |
| 50 | + unit: |
| 51 | + name: unit tests |
| 52 | + needs: build |
| 53 | + runs-on: ubuntu-latest |
| 54 | + steps: |
| 55 | + - name: Remove unnecessary files |
| 56 | + run: | |
| 57 | + sudo rm -rf /usr/share/dotnet |
| 58 | + sudo rm -rf "$AGENT_TOOLSDIRECTORY" |
| 59 | + - name: Install linker |
| 60 | + run: | |
| 61 | + sudo apt-get update |
| 62 | + sudo apt-get install -y --no-install-recommends \ |
| 63 | + gcc-multilib |
| 64 | + - name: Install Rust |
| 65 | + uses: dtolnay/rust-toolchain@stable |
| 66 | + - name: Check Rust version |
| 67 | + run: rustc --version |
| 68 | + - name: Install protoc |
| 69 | + uses: arduino/setup-protoc@v1 |
| 70 | + with: |
| 71 | + version: '3.x' |
| 72 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 73 | + - name: Checkout |
| 74 | + uses: actions/checkout@v3 |
| 75 | + - name: Run unit tests |
| 76 | + run: cargo test --all-features -p avalance-types -p avalanche-consensus |
| 77 | + |
| 78 | + avalanchego-integration-tests: |
| 79 | + needs: build |
| 80 | + runs-on: ubuntu-latest |
| 81 | + steps: |
| 82 | + - run: 'echo hello world' |
| 83 | + # - name: Checkout |
| 84 | + # uses: actions/checkout@v3 |
| 85 | + # - name: Remove unnecessary files |
| 86 | + # run: | |
| 87 | + # sudo rm -rf /usr/share/dotnet |
| 88 | + # sudo rm -rf "$AGENT_TOOLSDIRECTORY" |
| 89 | + # - name: Install linker |
| 90 | + # run: | |
| 91 | + # sudo apt-get update |
| 92 | + # sudo apt-get install -y --no-install-recommends \ |
| 93 | + # gcc-multilib |
| 94 | + # - name: Install protoc |
| 95 | + # uses: arduino/setup-protoc@v1 |
| 96 | + # with: |
| 97 | + # version: '3.x' |
| 98 | + # repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 99 | + |
| 100 | + # - name: Install Rust |
| 101 | + # uses: dtolnay/rust-toolchain@stable |
| 102 | + |
| 103 | + # - name: Install Go |
| 104 | + # uses: actions/setup-go@v4 |
| 105 | + # with: |
| 106 | + # go-version: '1.19' |
| 107 | + |
| 108 | + # - name: Run e2e tests |
| 109 | + # run: scripts/tests.avalanchego-e2e.sh |
| 110 | + |
| 111 | + avalanchego-conformance-tests: |
| 112 | + needs: build |
| 113 | + runs-on: ubuntu-latest |
| 114 | + steps: |
| 115 | + - run: 'echo hello world' |
| 116 | + # - name: Checkout |
| 117 | + # uses: actions/checkout@v3 |
| 118 | + # - name: Remove unnecessary files |
| 119 | + # run: | |
| 120 | + # sudo rm -rf /usr/share/dotnet |
| 121 | + # sudo rm -rf "$AGENT_TOOLSDIRECTORY" |
| 122 | + # - name: Install linker |
| 123 | + # run: | |
| 124 | + # sudo apt-get update |
| 125 | + # sudo apt-get install -y --no-install-recommends \ |
| 126 | + # gcc-multilib |
| 127 | + # - name: Install protoc |
| 128 | + # uses: arduino/setup-protoc@v1 |
| 129 | + # with: |
| 130 | + # version: '3.x' |
| 131 | + # repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 132 | + |
| 133 | + # - name: Install Rust |
| 134 | + # uses: dtolnay/rust-toolchain@stable |
| 135 | + |
| 136 | + # - name: Install Go |
| 137 | + # uses: actions/setup-go@v4 |
| 138 | + # with: |
| 139 | + # go-version: '1.19' |
| 140 | + |
| 141 | + # - name: Run e2e tests |
| 142 | + # run: scripts/tests.avalanchego-conformance.sh |
| 143 | + |
| 144 | + avalanchego-byzantine-tests: |
| 145 | + needs: build |
| 146 | + runs-on: ubuntu-latest |
| 147 | + steps: |
| 148 | + - run: 'echo hello world' |
| 149 | + # - name: Checkout |
| 150 | + # uses: actions/checkout@v3 |
| 151 | + # - name: Remove unnecessary files |
| 152 | + # run: | |
| 153 | + # sudo rm -rf /usr/share/dotnet |
| 154 | + # sudo rm -rf "$AGENT_TOOLSDIRECTORY" |
| 155 | + # - name: Install linker |
| 156 | + # run: | |
| 157 | + # sudo apt-get update |
| 158 | + # sudo apt-get install -y --no-install-recommends \ |
| 159 | + # gcc-multilib |
| 160 | + # - name: Install protoc |
| 161 | + # uses: arduino/setup-protoc@v1 |
| 162 | + # with: |
| 163 | + # version: '3.x' |
| 164 | + # repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 165 | + |
| 166 | + # - name: Install Rust |
| 167 | + # uses: dtolnay/rust-toolchain@stable |
| 168 | + |
| 169 | + # - name: Install Go |
| 170 | + # uses: actions/setup-go@v4 |
| 171 | + # with: |
| 172 | + # go-version: '1.19' |
| 173 | + |
| 174 | + # - name: Run e2e tests |
| 175 | + # run: scripts/tests.avalanchego-byzantine.sh |
| 176 | + |
| 177 | + fmt: |
| 178 | + runs-on: ubuntu-latest |
| 179 | + steps: |
| 180 | + - run: 'echo hello world' |
| 181 | + # - name: Remove unnecessary files |
| 182 | + # run: | |
| 183 | + # sudo rm -rf /usr/share/dotnet |
| 184 | + # sudo rm -rf "$AGENT_TOOLSDIRECTORY" |
| 185 | + # - name: Install linker |
| 186 | + # run: | |
| 187 | + # sudo apt-get update |
| 188 | + # sudo apt-get install -y --no-install-recommends \ |
| 189 | + # gcc-multilib |
| 190 | + # - name: Install Rust |
| 191 | + # uses: dtolnay/rust-toolchain@stable |
| 192 | + # - name: Check Rust version |
| 193 | + # run: rustc --version |
| 194 | + # - name: Install protoc |
| 195 | + # uses: arduino/setup-protoc@v1 |
| 196 | + # with: |
| 197 | + # version: '3.x' |
| 198 | + # repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 199 | + # - name: Checkout |
| 200 | + # uses: actions/checkout@v3 |
| 201 | + # - name: Run static analysis tests |
| 202 | + # shell: bash |
| 203 | + # run: cargo fmt --all --check |
| 204 | + clippy: |
| 205 | + needs: build |
| 206 | + runs-on: ubuntu-latest |
| 207 | + steps: |
| 208 | + - run: 'echo hello world' |
| 209 | + # - name: Remove unnecessary files |
| 210 | + # run: | |
| 211 | + # sudo rm -rf /usr/share/dotnet |
| 212 | + # sudo rm -rf "$AGENT_TOOLSDIRECTORY" |
| 213 | + # - name: Install linker |
| 214 | + # run: | |
| 215 | + # sudo apt-get update |
| 216 | + # sudo apt-get install -y --no-install-recommends \ |
| 217 | + # gcc-multilib |
| 218 | + # - name: Install Rust |
| 219 | + # uses: dtolnay/rust-toolchain@stable |
| 220 | + # - name: Check Rust version |
| 221 | + # run: rustc --version |
| 222 | + # - name: Install protoc |
| 223 | + # uses: arduino/setup-protoc@v1 |
| 224 | + # with: |
| 225 | + # version: '3.x' |
| 226 | + # repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 227 | + # - name: Checkout |
| 228 | + # uses: actions/checkout@v3 |
| 229 | + # - name: Run static analysis tests |
| 230 | + # shell: bash |
| 231 | + # run: cargo clippy --all --all-features --tests --benches --examples |
| 232 | + |
| 233 | + docs: |
| 234 | + runs-on: ubuntu-latest |
| 235 | + steps: |
| 236 | + - run: 'echo hello world' |
| 237 | + # - name: Remove unnecessary files |
| 238 | + # run: | |
| 239 | + # sudo rm -rf /usr/share/dotnet |
| 240 | + # sudo rm -rf "$AGENT_TOOLSDIRECTORY" |
| 241 | + # - name: Install linker |
| 242 | + # run: | |
| 243 | + # sudo apt-get update |
| 244 | + # sudo apt-get install -y --no-install-recommends \ |
| 245 | + # gcc-multilib |
| 246 | + # - name: Install Rust |
| 247 | + # uses: dtolnay/rust-toolchain@stable |
| 248 | + # - name: Check Rust version |
| 249 | + # run: rustc --version |
| 250 | + # - name: Install protoc |
| 251 | + # uses: arduino/setup-protoc@v1 |
| 252 | + # with: |
| 253 | + # version: '3.x' |
| 254 | + # repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 255 | + # - name: Checkout |
| 256 | + # uses: actions/checkout@v3 |
| 257 | + # - name: Set env var |
| 258 | + # shell: bash |
| 259 | + # run: export 'RUSTFLAGS=-D warnings' |
| 260 | + # # Fails the CI build if there are documentation warnings. |
| 261 | + # - name: Run doc tests |
| 262 | + # shell: bash |
| 263 | + # run: cargo doc --no-deps --all-features -p avalanche-consensus -p avalanche-types |
0 commit comments