nightly-build #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: nightly-build | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '14 1 * * *' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [stable, beta] | |
os: [custom-linux, windows10, custom-runner-mac-m1] | |
runs-on: ${{ matrix.os }} | |
env: | |
CARGO_TERM_COLOR: always | |
continue-on-error: true | |
steps: | |
- name: Install Dependencies (Linux) | |
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler | |
continue-on-error: true | |
if: matrix.os == 'custom-linux' | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
components: rustfmt, clippy | |
- name: Check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Build binaries | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --workspace | |
- name: Build examples | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --workspace --examples | |
- name: Run unit tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --workspace | |
- name: Run slow unit tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --workspace -- --ignored | |
- name: Clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --workspace --all-targets -- -D warnings | |
notification: | |
needs: build | |
runs-on: custom-linux | |
steps: | |
- name: Collect jobs status | |
uses: technote-space/workflow-conclusion-action@v2 | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: install npm | |
uses: actions/setup-node@v3 | |
if: env.WORKFLOW_CONCLUSION == 'failure' | |
with: | |
node-version: 18 | |
- name: Matrix - Node Install | |
if: env.WORKFLOW_CONCLUSION == 'failure' | |
run: npm install | |
working-directory: .github/workflows/support-files | |
- name: Matrix - Send Notification | |
if: env.WORKFLOW_CONCLUSION == 'failure' | |
env: | |
NYM_NOTIFICATION_KIND: nightly | |
NYM_PROJECT_NAME: "Nym nightly build" | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}" | |
GIT_BRANCH: "${GITHUB_REF##*/}" | |
IS_SUCCESS: "${{ env.WORKFLOW_CONCLUSION == 'success' }}" | |
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" | |
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_NIGHTLY }}" | |
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" | |
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" | |
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" | |
uses: docker://keybaseio/client:stable-node | |
with: | |
args: .github/workflows/support-files/notifications/entry_point.sh |