|
| 1 | +name: Triggerable Tasks |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + branch: |
| 7 | + description: 'The branch name' |
| 8 | + required: true |
| 9 | + type: string |
| 10 | + total_tests: |
| 11 | + description: 'Total prop. test cases' |
| 12 | + required: false |
| 13 | + default: 150 |
| 14 | + type: number |
| 15 | + |
| 16 | +permissions: |
| 17 | + id-token: read |
| 18 | + contents: read |
| 19 | + pull-requests: write |
| 20 | + |
| 21 | +env: |
| 22 | + GIT_LFS_SKIP_SMUDGE: 1 |
| 23 | + CHAIN_BUCKET: anoma-iac-files-master |
| 24 | + |
| 25 | +jobs: |
| 26 | + pos: |
| 27 | + runs-on: ${{ matrix.os }} |
| 28 | + timeout-minutes: ${{ matrix.make.timeout }} |
| 29 | + strategy: |
| 30 | + fail-fast: false |
| 31 | + matrix: |
| 32 | + os: [ubuntu-20.04] |
| 33 | + mold_version: [2.1.0] |
| 34 | + make: |
| 35 | + - name: Run PoS state-machine tests |
| 36 | + command: make test-pos-sm |
| 37 | + timeout: 360 |
| 38 | + cache_key: namada |
| 39 | + cache_version: v2 |
| 40 | + |
| 41 | + env: |
| 42 | + CARGO_INCREMENTAL: 0 |
| 43 | + RUST_BACKTRACE: full |
| 44 | + RUSTC_WRAPPER: sccache |
| 45 | + SCCACHE_CACHE_SIZE: 100G |
| 46 | + SCCACHE_BUCKET: namada-sccache-master |
| 47 | + |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v3 |
| 50 | + with: |
| 51 | + ref: ${{ inputs.branch }} |
| 52 | + - name: Configure AWS Credentials |
| 53 | + uses: aws-actions/configure-aws-credentials@v1 |
| 54 | + with: |
| 55 | + role-to-assume: arn:aws:iam::375643557360:role/anoma-github-action-ci-master |
| 56 | + aws-region: eu-west-1 |
| 57 | + - name: Install Protoc |
| 58 | + uses: arduino/setup-protoc@v1 |
| 59 | + with: |
| 60 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 61 | + - name: Run sccache-cache |
| 62 | + uses: mozilla-actions/[email protected] |
| 63 | + - name: Setup rust toolchain |
| 64 | + uses: oxidecomputer/actions-rs_toolchain@ad3f86084a8a5acf2c09cb691421b31cf8af7a36 |
| 65 | + with: |
| 66 | + profile: default |
| 67 | + override: true |
| 68 | + - name: Cache cargo registry |
| 69 | + uses: actions/cache@v3 |
| 70 | + continue-on-error: false |
| 71 | + with: |
| 72 | + path: | |
| 73 | + ~/.cargo/registry |
| 74 | + ~/.cargo/git |
| 75 | + key: ${{ runner.os }}-${{ matrix.make.cache_key }}-${{ matrix.make.cache_version }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 76 | + restore-keys: ${{ runner.os }}-${{ matrix.make.cache_key }}-${{ matrix.make.cache_version }}-cargo- |
| 77 | + - name: Start sccache server |
| 78 | + run: sccache --start-server |
| 79 | + - name: Install mold linker |
| 80 | + run: | |
| 81 | + wget -q -O- https://github.com/rui314/mold/releases/download/v${{ matrix.mold_version }}/mold-${{ matrix.mold_version }}-x86_64-linux.tar.gz | tar -xz |
| 82 | + mv mold-${{ matrix.mold_version }}-x86_64-linux/bin/mold /usr/local/bin |
| 83 | + - name: Run task `${{ matrix.make.name }}` |
| 84 | + run: ${{ matrix.make.command }} |
| 85 | + env: |
| 86 | + PROPTEST_CASES: ${{ inputs.total_tests }} |
| 87 | + RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold" |
| 88 | + - name: Stats sccache server |
| 89 | + run: sccache --show-stats || true |
| 90 | + - name: Start sccache server |
| 91 | + run: sccache --stop-server || true |
0 commit comments