Compare commits
58 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 33c162f3b4 | |||
| 2809c23722 | |||
| 66830d0a8d | |||
| 802449d8af | |||
| 5dd4245d4c | |||
| c49498a669 | |||
| 7d123b9fce | |||
| 3c76b8386a | |||
| bdb021994e | |||
| f732d83479 | |||
| 221d042a21 | |||
| 4dea20e15b | |||
| 6ae54b2f89 | |||
| fe2386eab2 | |||
| 2a551610ae | |||
| b00fa15b55 | |||
| 4d904257a9 | |||
| f3a192a023 | |||
| c67c114af6 | |||
| 87c8b512b0 | |||
| 36d8502fed | |||
| ec2bf0beaf | |||
| 36b20d4e6e | |||
| 9554cebb2b | |||
| b9c4922e1a | |||
| 65ef3f02e7 | |||
| a75ca9f114 | |||
| aa2410c99b | |||
| c1df8eef62 | |||
| f5726a07f3 | |||
| 639fb802a4 | |||
| 9b945acba3 | |||
| 70a28d3767 | |||
| 533f6c5b24 | |||
| fba653fcfd | |||
| 22c0669f5d | |||
| edfd9531af | |||
| bbd35feb81 | |||
| bd26bc192e | |||
| 39af6abec7 | |||
| d1563c079e | |||
| 8250dca8be | |||
| 5bf0a14c20 | |||
| 6a3d10bab7 | |||
| 842b58751a | |||
| 544355bbfd | |||
| bd64a29932 | |||
| ed2cf1ced6 | |||
| 890b0bb677 | |||
| 09efb62fa1 | |||
| 4e80c57076 | |||
| 8c2361757e | |||
| 0eaad032f6 | |||
| 371467cede | |||
| 9110a8eefd | |||
| 2e8a0e9a72 | |||
| b068dde7c7 | |||
| d93918e99b |
@@ -3,21 +3,3 @@
|
|||||||
|
|
||||||
RUST_LOG=info
|
RUST_LOG=info
|
||||||
RUST_BACKTRACE=1
|
RUST_BACKTRACE=1
|
||||||
|
|
||||||
#########################################
|
|
||||||
# geoipupdate (needed for explorer-api) #
|
|
||||||
#########################################
|
|
||||||
# MaxMind account ID (change it to a valid account ID)
|
|
||||||
GEOIPUPDATE_ACCOUNT_ID=xxx
|
|
||||||
# MaxMind license key (change it to a valid license key)
|
|
||||||
GEOIPUPDATE_LICENSE_KEY=xxx
|
|
||||||
# List of space-separated database edition IDs. Edition IDs may
|
|
||||||
# consist of letters, digits, and dashes. For example, GeoIP2-City
|
|
||||||
# would download the GeoIP2 City database (GeoIP2-City).
|
|
||||||
GEOIPUPDATE_EDITION_IDS=GeoLite2-City
|
|
||||||
# The number of hours between geoipupdate runs. If this is not set
|
|
||||||
# or is set to 0, geoipupdate will run once and exit.
|
|
||||||
GEOIPUPDATE_FREQUENCY=72
|
|
||||||
# The path to the directory where geoipupdate will download the
|
|
||||||
# database.
|
|
||||||
GEOIP_DB_DIRECTORY=./explorer-api/geo_ip
|
|
||||||
|
|||||||
+7
-7
@@ -15,14 +15,14 @@
|
|||||||
* @futurechimp @mmsinclair
|
* @futurechimp @mmsinclair
|
||||||
|
|
||||||
# Rust rules:
|
# Rust rules:
|
||||||
*.rs @durch @futurechimp @jstuczyn @neacsu @octol
|
*.rs @durch @futurechimp @jstuczyn @neacsu
|
||||||
Cargo.* @durch @futurechimp @jstuczyn @neacsu @octol
|
Cargo.* @durch @futurechimp @jstuczyn @neacsu
|
||||||
|
|
||||||
# JS rules:
|
# JS rules:
|
||||||
*.js @mmsinclair @fmtabbara
|
*.js @mmsinclair @fmtabbara @Aid19801
|
||||||
*.ts @mmsinclair @fmtabbara
|
*.ts @mmsinclair @fmtabbara @Aid19801
|
||||||
*.tsx @mmsinclair @fmtabbara
|
*.tsx @mmsinclair @fmtabbara @Aid19801
|
||||||
*.jsx @mmsinclair @fmtabbara
|
*.jsx @mmsinclair @fmtabbara @Aid19801
|
||||||
|
|
||||||
# Something looking like possible documentation rules:
|
# Something looking like possible documentation rules:
|
||||||
*.md @mfahampshire
|
*.md @mfahampshire
|
||||||
@@ -36,5 +36,5 @@ Cargo.* @durch @futurechimp @jstuczyn @neacsu @octol
|
|||||||
|
|
||||||
# Explorer and wallet should probably get looked by the product team
|
# Explorer and wallet should probably get looked by the product team
|
||||||
/explorer/ @nymtech/product
|
/explorer/ @nymtech/product
|
||||||
/nym-wallet/ @nymtech/product
|
/tauri-wallet/ @nymtech/product
|
||||||
/wallet-web/ @nymtech/product
|
/wallet-web/ @nymtech/product
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
# Description
|
|
||||||
|
|
||||||
Closes: #XXXX
|
|
||||||
|
|
||||||
<!-- If appropriate, insert relevant description here -->
|
|
||||||
|
|
||||||
# Checklist:
|
|
||||||
|
|
||||||
- [ ] added a changelog entry to `CHANGELOG.md`
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# To get started with Dependabot version updates, you'll need to specify which
|
|
||||||
# package ecosystems to update and where the package manifests are located.
|
|
||||||
# Please see the documentation for all configuration options:
|
|
||||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
||||||
|
|
||||||
version: 2
|
|
||||||
updates:
|
|
||||||
# Maintain dependencies for GitHub Actions
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
commit-message:
|
|
||||||
prefix: build
|
|
||||||
prefix-development: chore
|
|
||||||
include: scope
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
name: Daily security audit
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '5 9 * * *'
|
|
||||||
jobs:
|
|
||||||
cargo-deny:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install rust toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: Install cargo deny
|
|
||||||
run: cargo install --locked cargo-deny
|
|
||||||
- name: Run cargo deny
|
|
||||||
run: |
|
|
||||||
find . -name Cargo.toml -exec cargo deny --manifest-path {} check \
|
|
||||||
advisories -A advisory-not-detected --hide-inclusion-graph \; &> \
|
|
||||||
>(uniq &> .github/workflows/support-files/notifications/deny.message )
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: report
|
|
||||||
path: .github/workflows/support-files/notifications/deny.message
|
|
||||||
notification:
|
|
||||||
needs: cargo-deny
|
|
||||||
runs-on: custom-runner-linux
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Download report from previous job
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: report
|
|
||||||
path: .github/workflows/support-files/notifications
|
|
||||||
- name: install npm
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
- name: Matrix - Node Install
|
|
||||||
run: npm install
|
|
||||||
working-directory: .github/workflows/support-files
|
|
||||||
- name: Matrix - Send Notification
|
|
||||||
env:
|
|
||||||
NYM_NOTIFICATION_KIND: security
|
|
||||||
NYM_PROJECT_NAME: "Daily security report"
|
|
||||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_AUDIT }}"
|
|
||||||
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
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
name: Build and upload binaries to CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'clients/**'
|
|
||||||
- 'common/**'
|
|
||||||
- 'contracts/**'
|
|
||||||
- 'explorer-api/**'
|
|
||||||
- 'gateway/**'
|
|
||||||
- 'integrations/**'
|
|
||||||
- 'mixnode/**'
|
|
||||||
- 'sdk/rust/nym-sdk/**'
|
|
||||||
- 'service-providers/**'
|
|
||||||
- 'nym-api/**'
|
|
||||||
- 'nym-outfox/**'
|
|
||||||
- 'tools/nym-cli/**'
|
|
||||||
- 'tools/ts-rs-cli/**'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'clients/**'
|
|
||||||
- 'common/**'
|
|
||||||
- 'contracts/**'
|
|
||||||
- 'explorer-api/**'
|
|
||||||
- 'gateway/**'
|
|
||||||
- 'integrations/**'
|
|
||||||
- 'mixnode/**'
|
|
||||||
- 'sdk/rust/nym-sdk/**'
|
|
||||||
- 'service-providers/**'
|
|
||||||
- 'nym-api/**'
|
|
||||||
- 'nym-outfox/**'
|
|
||||||
- 'tools/nym-cli/**'
|
|
||||||
- 'tools/ts-rs-cli/**'
|
|
||||||
|
|
||||||
env:
|
|
||||||
NETWORK: mainnet
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-nym:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-20.04]
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Prepare build output directory
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
OUTPUT_DIR: ci-builds/${{ github.ref_name }}
|
|
||||||
run: |
|
|
||||||
rm -rf ci-builds || true
|
|
||||||
mkdir -p $OUTPUT_DIR
|
|
||||||
echo $OUTPUT_DIR
|
|
||||||
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
|
|
||||||
- name: Build all binaries
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace --release --all
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: wasm32-unknown-unknown
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
|
||||||
|
|
||||||
- name: Install wasm-opt
|
|
||||||
run: cargo install --version 0.112.0 wasm-opt
|
|
||||||
|
|
||||||
- name: Build release contracts
|
|
||||||
run: make wasm
|
|
||||||
|
|
||||||
- name: Prepare build output
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
OUTPUT_DIR: ci-builds/${{ github.ref_name }}
|
|
||||||
run: |
|
|
||||||
cp target/release/nym-client $OUTPUT_DIR
|
|
||||||
cp target/release/nym-gateway $OUTPUT_DIR
|
|
||||||
cp target/release/nym-mixnode $OUTPUT_DIR
|
|
||||||
cp target/release/nym-socks5-client $OUTPUT_DIR
|
|
||||||
cp target/release/nym-api $OUTPUT_DIR
|
|
||||||
cp target/release/nym-network-requester $OUTPUT_DIR
|
|
||||||
cp target/release/nym-network-statistics $OUTPUT_DIR
|
|
||||||
cp target/release/nym-cli $OUTPUT_DIR
|
|
||||||
cp target/release/nym-credential-client $OUTPUT_DIR
|
|
||||||
cp target/release/explorer-api $OUTPUT_DIR
|
|
||||||
|
|
||||||
cp contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm $OUTPUT_DIR
|
|
||||||
cp contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm $OUTPUT_DIR
|
|
||||||
cp contracts/target/wasm32-unknown-unknown/release/nym_coconut_bandwidth.wasm $OUTPUT_DIR
|
|
||||||
cp contracts/target/wasm32-unknown-unknown/release/nym_coconut_dkg.wasm $OUTPUT_DIR
|
|
||||||
cp contracts/target/wasm32-unknown-unknown/release/cw3_flex_multisig.wasm $OUTPUT_DIR
|
|
||||||
cp contracts/target/wasm32-unknown-unknown/release/cw4_group.wasm $OUTPUT_DIR
|
|
||||||
|
|
||||||
- name: Deploy branch to CI www
|
|
||||||
continue-on-error: true
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-avzr"
|
|
||||||
SOURCE: "ci-builds/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/builds/
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
name: Build and upload binaries to artifact storage
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
add_tokio_unstable:
|
|
||||||
description: 'True to add RUSTFLAGS="--cfg tokio_unstable"'
|
|
||||||
required: true
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
env:
|
|
||||||
NETWORK: mainnet
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-nym:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-20.04]
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Sets env vars for tokio if set in manual dispatch inputs
|
|
||||||
run: |
|
|
||||||
echo 'RUSTFLAGS="--cfg tokio_unstable"' >> $GITHUB_ENV
|
|
||||||
if: github.event_name == 'workflow_dispatch' && inputs.add_tokio_unstable == true
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
|
|
||||||
- name: Build all binaries
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace --release
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: nym-binaries-artifacts
|
|
||||||
path: |
|
|
||||||
target/release/nym-client
|
|
||||||
target/release/nym-gateway
|
|
||||||
target/release/nym-mixnode
|
|
||||||
target/release/nym-socks5-client
|
|
||||||
target/release/nym-api
|
|
||||||
target/release/nym-network-requester
|
|
||||||
target/release/nym-network-statistics
|
|
||||||
target/release/nym-cli
|
|
||||||
retention-days: 30
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
name: CI for ts-packages
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'ts-packages/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: custom-runner-linux
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install rsync
|
|
||||||
run: sudo apt-get install rsync
|
|
||||||
continue-on-error: true
|
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
- name: Setup yarn
|
|
||||||
run: npm install -g yarn
|
|
||||||
- name: Build
|
|
||||||
run: yarn && yarn build && yarn build:ci
|
|
||||||
- name: Deploy branch to CI www (storybook)
|
|
||||||
continue-on-error: true
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "ts-packages/dist/storybook/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/ts-${{ env.GITHUB_REF_SLUG }}
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
- name: Deploy branch to CI www (example)
|
|
||||||
continue-on-error: true
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "ts-packages/dist/example/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/ts-${{ env.GITHUB_REF_SLUG }}-example
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
- name: Matrix - Node Install
|
|
||||||
run: npm install
|
|
||||||
working-directory: .github/workflows/support-files
|
|
||||||
- name: Matrix - Send Notification
|
|
||||||
env:
|
|
||||||
NYM_NOTIFICATION_KIND: ts-packages
|
|
||||||
NYM_PROJECT_NAME: "ts-packages"
|
|
||||||
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
|
||||||
NYM_CI_WWW_LOCATION: "ts-${{ env.GITHUB_REF_SLUG }}"
|
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
|
||||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
|
||||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
|
||||||
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
|
|
||||||
+108
-69
@@ -1,45 +1,20 @@
|
|||||||
name: Continuous integration
|
name: Continuous integration
|
||||||
|
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'clients/**'
|
|
||||||
- 'common/**'
|
|
||||||
- 'explorer-api/**'
|
|
||||||
- 'gateway/**'
|
|
||||||
- 'integrations/**'
|
|
||||||
- 'mixnode/**'
|
|
||||||
- 'sdk/rust/nym-sdk/**'
|
|
||||||
- 'service-providers/**'
|
|
||||||
- 'nym-api/**'
|
|
||||||
- 'nym-outfox/**'
|
|
||||||
- 'tools/nym-cli/**'
|
|
||||||
- 'tools/ts-rs-cli/**'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'clients/**'
|
|
||||||
- 'common/**'
|
|
||||||
- 'explorer-api/**'
|
|
||||||
- 'gateway/**'
|
|
||||||
- 'integrations/**'
|
|
||||||
- 'mixnode/**'
|
|
||||||
- 'sdk/rust/nym-sdk/**'
|
|
||||||
- 'service-providers/**'
|
|
||||||
- 'nym-api/**'
|
|
||||||
- 'nym-outfox/**'
|
|
||||||
- 'tools/nym-cli/**'
|
|
||||||
- 'tools/ts-rs-cli/**'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: [ self-hosted, custom-linux ]
|
runs-on: ${{ matrix.os }}
|
||||||
# Enable sccache via environment variable
|
continue-on-error: ${{ matrix.rust == 'nightly' || matrix.rust == 'beta' || matrix.os == 'windows-latest' }}
|
||||||
env:
|
strategy:
|
||||||
RUSTC_WRAPPER: /home/ubuntu/.cargo/bin/sccache
|
matrix:
|
||||||
|
rust: [stable, beta, nightly]
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Dependencies (Linux)
|
- name: Install Dependencies (Linux)
|
||||||
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
|
run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools
|
||||||
continue-on-error: true
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@@ -48,50 +23,114 @@ jobs:
|
|||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: stable
|
toolchain: ${{ matrix.rust }}
|
||||||
override: true
|
override: true
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Build all binaries
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: --all
|
||||||
|
|
||||||
|
- name: Run all tests
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --all
|
||||||
|
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: fmt
|
command: fmt
|
||||||
args: --all -- --check
|
args: --all -- --check
|
||||||
|
|
||||||
- name: Build all binaries
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Build all examples
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace --examples
|
|
||||||
|
|
||||||
- name: Run all tests
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Run expensive tests
|
|
||||||
if: github.ref == 'refs/heads/develop' || github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'master'
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --workspace -- --ignored
|
|
||||||
|
|
||||||
- uses: actions-rs/clippy-check@v1
|
|
||||||
name: Clippy checks
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
if: ${{ matrix.rust != 'nightly' }}
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: -- -D warnings
|
||||||
|
|
||||||
|
# COCONUT stuff
|
||||||
|
- name: Reclaim some disk space (because Windows is being annoying)
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
if: ${{ matrix.os == 'windows-latest' }}
|
||||||
|
with:
|
||||||
|
command: clean
|
||||||
|
|
||||||
|
# BUILD
|
||||||
|
- name: Build gateway with coconut feature
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: --bin nym-gateway --features=coconut
|
||||||
|
|
||||||
|
- name: Build native client with coconut feature
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: --bin nym-client --features=coconut
|
||||||
|
|
||||||
|
- name: Build socks5 client with coconut feature
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: --bin nym-socks5-client --features=coconut
|
||||||
|
|
||||||
|
- name: Build validator-api with coconut feature
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: --bin nym-validator-api --features=coconut
|
||||||
|
|
||||||
|
# TEST
|
||||||
|
- name: Test gateway with coconut feature
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --bin nym-gateway --features=coconut
|
||||||
|
|
||||||
|
- name: Test native client with coconut feature
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --bin nym-client --features=coconut
|
||||||
|
|
||||||
|
- name: Test socks5 client with coconut feature
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --bin nym-socks5-client --features=coconut
|
||||||
|
|
||||||
|
- name: Test validator-api with coconut feature
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --bin nym-validator-api --features=coconut
|
||||||
|
|
||||||
|
# CLIPPY
|
||||||
|
|
||||||
|
- name: Run clippy on gateway with coconut feature
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --workspace --all-targets -- -D warnings
|
args: --bin nym-gateway --features=coconut -- -D warnings
|
||||||
|
|
||||||
|
- name: Run clippy on native client with coconut feature
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: --bin nym-client --features=coconut -- -D warnings
|
||||||
|
|
||||||
|
- name: Run clippy on socks5 client with coconut feature
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: --bin nym-socks5-client --features=coconut -- -D warnings
|
||||||
|
|
||||||
|
- name: Run clippy on validator-api with coconut feature
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: --bin nym-validator-api --features=coconut -- -D warnings
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"os":"ubuntu-20.04",
|
|
||||||
"rust":"stable",
|
|
||||||
"runOnEvent":"always"
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"os":"windows-latest",
|
|
||||||
"rust":"stable",
|
|
||||||
"runOnEvent":"pull_request"
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"os":"macos-latest",
|
|
||||||
"rust":"stable",
|
|
||||||
"runOnEvent":"pull_request"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
name: CD dev-portal
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: master
|
|
||||||
paths:
|
|
||||||
- 'documentation/dev-portal/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: custom-runner-linux
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Install rsync
|
|
||||||
run: sudo apt-get install rsync
|
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: "16"
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: Install mdbook
|
|
||||||
run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4" mdbook)
|
|
||||||
- name: Install mdbook plugins
|
|
||||||
run: |
|
|
||||||
cargo install --vers "^0.2.0" mdbook-variables && cargo install \
|
|
||||||
--vers "^1.8.0" mdbook-admonish && cargo install --vers \
|
|
||||||
"^0.1.2" mdbook-last-changed && cargo install --vers "^0.1.2" \
|
|
||||||
mdbook-theme && cargo install --vers "^0.7.7" mdbook-linkcheck
|
|
||||||
- name: Clean website
|
|
||||||
run: cd documentation/dev-portal && mdbook clean
|
|
||||||
- name: Build website
|
|
||||||
run: cd documentation/dev-portal && mdbook build
|
|
||||||
- name: Deploy branch master to dev
|
|
||||||
continue-on-error: true
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CD_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "documentation/dev-portal/book/html/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CD_WWW_REMOTE_HOST_DEV }}
|
|
||||||
REMOTE_USER: ${{ secrets.CD_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CD_WWW_REMOTE_TARGET_DEVP }}/
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
- name: Deploy branch master to prod
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CD_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "documentation/dev-portal/book/html/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CD_WWW_REMOTE_HOST_PROD }}
|
|
||||||
REMOTE_USER: ${{ secrets.CD_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CD_WWW_REMOTE_TARGET_DEVP }}/
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
- name: Matrix - Node Install
|
|
||||||
run: npm install
|
|
||||||
working-directory: .github/workflows/support-files
|
|
||||||
- name: Matrix - Send Notification
|
|
||||||
env:
|
|
||||||
NYM_NOTIFICATION_KIND: cd-dev
|
|
||||||
NYM_PROJECT_NAME: "Dev portal CD"
|
|
||||||
NYM_CI_WWW_BASE: "${{ secrets.NYM_CD_WWW_BASE }}"
|
|
||||||
NYM_CI_WWW_LOCATION: "${{ env.GITHUB_REF_SLUG }}"
|
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
|
||||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_DEVP }}"
|
|
||||||
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
|
||||||
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
|
||||||
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
|
||||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
|
||||||
uses: docker://keybaseio/client:stable-node
|
|
||||||
with:
|
|
||||||
args: .github/workflows/support-files/notifications/entry_point.sh
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
name: CD docs
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: master
|
|
||||||
paths:
|
|
||||||
- 'documentation/docs/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: custom-runner-linux
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Install rsync
|
|
||||||
run: sudo apt-get install rsync
|
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: "16"
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: Build all binaries
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace --release --all
|
|
||||||
- name: Install mdbook
|
|
||||||
run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4" mdbook)
|
|
||||||
- name: Install mdbook plugins
|
|
||||||
run: |
|
|
||||||
cargo install --vers "^0.2.0" mdbook-variables && cargo install \
|
|
||||||
--vers "^1.8.0" mdbook-admonish && cargo install --vers \
|
|
||||||
"^0.1.2" mdbook-last-changed && cargo install --vers "^0.1.2" \
|
|
||||||
mdbook-theme && cargo install --vers "^0.7.7" mdbook-linkcheck && \
|
|
||||||
cargo install --vers "^0.5.0" mdbook-cmdrun
|
|
||||||
- name: Clean website
|
|
||||||
run: cd documentation/docs && mdbook clean
|
|
||||||
- name: Build website
|
|
||||||
run: cd documentation/docs && mdbook build
|
|
||||||
- name: Deploy branch master to dev
|
|
||||||
continue-on-error: true
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CD_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "documentation/docs/book/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CD_WWW_REMOTE_HOST_DEV }}
|
|
||||||
REMOTE_USER: ${{ secrets.CD_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CD_WWW_REMOTE_TARGET }}/
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
- name: Deploy branch master to prod
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CD_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "documentation/docs/book/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CD_WWW_REMOTE_HOST_PROD }}
|
|
||||||
REMOTE_USER: ${{ secrets.CD_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CD_WWW_REMOTE_TARGET }}/
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
- name: Matrix - Node Install
|
|
||||||
run: npm install
|
|
||||||
working-directory: .github/workflows/support-files
|
|
||||||
- name: Matrix - Send Notification
|
|
||||||
env:
|
|
||||||
NYM_NOTIFICATION_KIND: cd-docs
|
|
||||||
NYM_PROJECT_NAME: "Docs CD"
|
|
||||||
NYM_CI_WWW_BASE: "${{ secrets.NYM_CD_WWW_BASE }}"
|
|
||||||
NYM_CI_WWW_LOCATION: "${{ env.GITHUB_REF_SLUG }}"
|
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
|
||||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_DOCS }}"
|
|
||||||
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
|
||||||
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
|
||||||
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
|
||||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
|
||||||
uses: docker://keybaseio/client:stable-node
|
|
||||||
with:
|
|
||||||
args: .github/workflows/support-files/notifications/entry_point.sh
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
name: check-merge-conflicts
|
|
||||||
|
|
||||||
# Check that the latest release branch merges into master and develop without
|
|
||||||
# any conflicts that git is not able to resolve
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: '5 6 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
get_release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
output1: ${{ steps.step2.outputs.latest_release }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Set output variable to latest release branch
|
|
||||||
id: step2
|
|
||||||
run: echo "latest_release=$(git branch -r | grep -E 'release/v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
check-merge-release-into-master:
|
|
||||||
name: Check that the release branch merges into master
|
|
||||||
needs: get_release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup git user
|
|
||||||
run: |
|
|
||||||
git config --global user.name "ci"
|
|
||||||
git config --global user.email "ci@localhost"
|
|
||||||
- name: Check merge release branch into master
|
|
||||||
run: |
|
|
||||||
./.github/workflows/support-files/git-merge-check.sh origin/master $branch1
|
|
||||||
env:
|
|
||||||
branch1: ${{needs.get_release.outputs.output1}}
|
|
||||||
|
|
||||||
check-merge-release-into-develop:
|
|
||||||
name: Check that the release branch merges into develop
|
|
||||||
needs: get_release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup git user
|
|
||||||
run: |
|
|
||||||
git config --global user.name "ci"
|
|
||||||
git config --global user.email "ci@localhost"
|
|
||||||
- name: Check merge release branch into develop
|
|
||||||
run: |
|
|
||||||
./.github/workflows/support-files/git-merge-check.sh origin/develop $branch1
|
|
||||||
env:
|
|
||||||
branch1: ${{needs.get_release.outputs.output1}}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
name: Run config checks on all binaries
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'clients/**'
|
|
||||||
- 'common/**'
|
|
||||||
- 'contracts/**'
|
|
||||||
- 'integrations/**'
|
|
||||||
- 'mixnode/**'
|
|
||||||
- 'sdk/rust/nym-sdk/**'
|
|
||||||
- 'service-providers/**'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'clients/**'
|
|
||||||
- 'common/**'
|
|
||||||
- 'gateway/**'
|
|
||||||
- 'integrations/**'
|
|
||||||
- 'mixnode/**'
|
|
||||||
- 'sdk/rust/nym-sdk/**'
|
|
||||||
- 'service-providers/**'
|
|
||||||
|
|
||||||
env:
|
|
||||||
NETWORK: mainnet
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-nym:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [custom-runner-linux]
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
run: sudo apt-get update && sudo apt-get -y install jq vim libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
|
|
||||||
- name: Branch name
|
|
||||||
run: echo running on branch ${GITHUB_REF##*/}
|
|
||||||
|
|
||||||
- name: Run tests against binaries
|
|
||||||
run: ./build_and_run.sh ${{ github.head_ref || github.ref_name }}
|
|
||||||
working-directory: tests/
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
name: CI dev-portal
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore: master
|
|
||||||
paths:
|
|
||||||
- 'documentation/dev-portal/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: custom-runner-linux
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Install rsync
|
|
||||||
run: sudo apt-get install rsync
|
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: "16"
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: Install mdbook
|
|
||||||
run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4" mdbook)
|
|
||||||
- name: Install mdbook plugins
|
|
||||||
run: |
|
|
||||||
cargo install --vers "^0.2.0" mdbook-variables && cargo install \
|
|
||||||
--vers "^1.8.0" mdbook-admonish && cargo install --vers \
|
|
||||||
"^0.1.2" mdbook-last-changed && cargo install --vers "^0.1.2" mdbook-theme \
|
|
||||||
&& cargo install --vers "^0.7.7" mdbook-linkcheck
|
|
||||||
- name: Clean website
|
|
||||||
run: cd documentation/dev-portal && mdbook clean
|
|
||||||
- name: Build website
|
|
||||||
run: cd documentation/dev-portal && mdbook build
|
|
||||||
- name: Deploy branch to CI www
|
|
||||||
continue-on-error: true
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "documentation/dev-portal/book/html/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/dev-portal-${{ env.GITHUB_REF_SLUG }}
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
- name: Matrix - Node Install
|
|
||||||
run: npm install
|
|
||||||
working-directory: .github/workflows/support-files
|
|
||||||
- name: Matrix - Send Notification
|
|
||||||
env:
|
|
||||||
NYM_NOTIFICATION_KIND: ci-dev
|
|
||||||
NYM_PROJECT_NAME: "Dev portal CI"
|
|
||||||
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
|
||||||
NYM_CI_WWW_LOCATION: "dev-portal-${{ env.GITHUB_REF_SLUG }}"
|
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
|
||||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_DEVP }}"
|
|
||||||
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
|
||||||
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
|
||||||
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
|
||||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
|
||||||
uses: docker://keybaseio/client:stable-node
|
|
||||||
with:
|
|
||||||
args: .github/workflows/support-files/notifications/entry_point.sh
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
name: CI docs
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore: master
|
|
||||||
paths:
|
|
||||||
- 'documentation/docs/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: custom-runner-linux
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Install rsync
|
|
||||||
run: sudo apt-get install rsync
|
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: "16"
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: Build all binaries
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace --release --all
|
|
||||||
- name: Install mdbook
|
|
||||||
run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4" mdbook)
|
|
||||||
- name: Install mdbook plugins
|
|
||||||
run: |
|
|
||||||
cargo install --vers "^0.2.0" mdbook-variables && cargo install \
|
|
||||||
--vers "^1.8.0" mdbook-admonish && cargo install --vers \
|
|
||||||
"^0.1.2" mdbook-last-changed && cargo install --vers "^0.1.2" \
|
|
||||||
mdbook-theme && cargo install --vers "^0.7.7" mdbook-linkcheck && \
|
|
||||||
cargo install --vers "^0.5.0" mdbook-cmdrun
|
|
||||||
- name: Clean website
|
|
||||||
run: cd documentation/docs && mdbook clean
|
|
||||||
- name: Build website
|
|
||||||
run: cd documentation/docs && mdbook build
|
|
||||||
- name: Deploy branch to CI www
|
|
||||||
continue-on-error: true
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "documentation/docs/book/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/docs-${{ env.GITHUB_REF_SLUG }}
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
- name: Matrix - Node Install
|
|
||||||
run: npm install
|
|
||||||
working-directory: .github/workflows/support-files
|
|
||||||
- name: Matrix - Send Notification
|
|
||||||
env:
|
|
||||||
NYM_NOTIFICATION_KIND: ci-docs
|
|
||||||
NYM_PROJECT_NAME: "Docs CI"
|
|
||||||
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
|
||||||
NYM_CI_WWW_LOCATION: "docs-${{ env.GITHUB_REF_SLUG }}"
|
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
|
||||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_DOCS }}"
|
|
||||||
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
|
||||||
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
|
||||||
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
|
||||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
|
||||||
uses: docker://keybaseio/client:stable-node
|
|
||||||
with:
|
|
||||||
args: .github/workflows/support-files/notifications/entry_point.sh
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
name: Clippy check
|
||||||
|
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
clippy_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- run: rustup component add clippy
|
||||||
|
- uses: actions-rs/clippy-check@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
args: --all-features
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
name: Nym Connect - Android APK Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "release/nc-android-v[0-9].[0-9].[0-9]*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build APK
|
|
||||||
runs-on: custom-runner-linux
|
|
||||||
env:
|
|
||||||
ANDROID_HOME: ${{ github.workspace }}/android-sdk
|
|
||||||
NDK_VERSION: 25.1.8937393
|
|
||||||
NDK_HOME: ${{ github.workspace }}/android-sdk/ndk/25.1.8937393
|
|
||||||
SDK_PLATFORM_VERSION: android-33
|
|
||||||
SDK_BUILDTOOLS_VERSION: 33.0.1
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
# https://next--tauri.netlify.app/next/guides/getting-started/prerequisites/linux/#1-system-dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get -y install \
|
|
||||||
build-essential \
|
|
||||||
unzip \
|
|
||||||
curl \
|
|
||||||
wget \
|
|
||||||
libssl-dev \
|
|
||||||
squashfs-tools \
|
|
||||||
librsvg2-dev
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install Java
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
distribution: "temurin"
|
|
||||||
java-version: "17"
|
|
||||||
|
|
||||||
- name: Install Android SDK manager
|
|
||||||
# https://developer.android.com/studio/command-line/sdkmanager
|
|
||||||
run: |
|
|
||||||
curl -sS https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip -o cmdline-tools.zip
|
|
||||||
unzip cmdline-tools.zip
|
|
||||||
mkdir -p $ANDROID_HOME/cmdline-tools/latest
|
|
||||||
mv cmdline-tools/* $ANDROID_HOME/cmdline-tools/latest
|
|
||||||
rm -rf cmdline-tools
|
|
||||||
|
|
||||||
- name: Install Android S/NDK
|
|
||||||
run: |
|
|
||||||
echo y | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses
|
|
||||||
echo y | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager \
|
|
||||||
"platforms;$SDK_PLATFORM_VERSION" \
|
|
||||||
"platform-tools" \
|
|
||||||
"ndk;$NDK_VERSION" \
|
|
||||||
"build-tools;$SDK_BUILDTOOLS_VERSION"
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
# TODO this step takes a considerable amount of time
|
|
||||||
# We could avoid to compile from source tauri-cli and use instead
|
|
||||||
# pre-compiled binary provided by the node package `@tauri-apps/cli`
|
|
||||||
# But when using the later the build fails for some reason
|
|
||||||
# so keep installing and using tauri-cli
|
|
||||||
- name: Install tauri cli
|
|
||||||
run: cargo install tauri-cli --version "^2.0.0-alpha.2"
|
|
||||||
|
|
||||||
- name: Install rust android targets
|
|
||||||
run: |
|
|
||||||
rustup target add aarch64-linux-android \
|
|
||||||
armv7-linux-androideabi \
|
|
||||||
i686-linux-android \
|
|
||||||
x86_64-linux-android
|
|
||||||
|
|
||||||
- name: Setup Nodejs
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
|
|
||||||
- name: Install yarn
|
|
||||||
run: |
|
|
||||||
npm i -g yarn
|
|
||||||
yarn --version
|
|
||||||
|
|
||||||
- name: Build frontend code
|
|
||||||
run: |
|
|
||||||
yarn install --frozen-lockfile
|
|
||||||
yarn build
|
|
||||||
yarn workspace @nym/nym-connect-mobile webpack:prod
|
|
||||||
|
|
||||||
- name: Build APK
|
|
||||||
working-directory: nym-connect/mobile
|
|
||||||
env:
|
|
||||||
# NODE_TAURI_CLI=${{ github.workspace }}/nym-connect/mobile/node_modules/.bin/tauri
|
|
||||||
ANDROID_SDK_ROOT: ${{ env.ANDROID_HOME }}
|
|
||||||
WRY_ANDROID_PACKAGE: net.nymtech.nym_connect
|
|
||||||
WRY_ANDROID_LIBRARY: nym_connect
|
|
||||||
# TODO build with release profile (--release), it will requires
|
|
||||||
# to sign the APK. For now build with debug profile to avoid that
|
|
||||||
# TODO build using `yarn tauri`, provide NODE_TAURI_CLI, see TODO notes above
|
|
||||||
run: cargo tauri android build --debug --apk --split-per-abi -t aarch64
|
|
||||||
|
|
||||||
# TODO add the version number to APK name
|
|
||||||
- name: Rename APK artifact
|
|
||||||
run: |
|
|
||||||
mkdir apk/
|
|
||||||
mv nym-connect/mobile/src-tauri/gen/android/nym_connect/app/build/outputs/apk/arm64/debug/app-arm64-debug.apk \
|
|
||||||
apk/nym-connect-arm64-debug.apk
|
|
||||||
mv nym-connect/mobile/src-tauri/gen/android/nym_connect/app/build/outputs/apk/x86_64/debug/app-x86_64-debug.apk \
|
|
||||||
apk/nym-connect-x86_64-debug.apk
|
|
||||||
|
|
||||||
- name: Upload APK artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: nc-apk-debug
|
|
||||||
path: |
|
|
||||||
apk/nym-connect-arm64-debug.apk
|
|
||||||
apk/nym-connect-x86_64-debug.apk
|
|
||||||
|
|
||||||
# publish:
|
|
||||||
# name: Publish APK
|
|
||||||
# needs: build
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - name: Checkout
|
|
||||||
# uses: actions/checkout@v3
|
|
||||||
# - name: Download binary artifact
|
|
||||||
# uses: actions/download-artifact@v3
|
|
||||||
# with:
|
|
||||||
# name: nc-apk-debug
|
|
||||||
# path: apk
|
|
||||||
# # TODO add a step to upload the APK somewhere
|
|
||||||
# - name: Publish
|
|
||||||
# uses: ???
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
name: CI for nym-connect - Desktop
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'nym-connect/desktop/**'
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: nym-connect/desktop
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: custom-runner-linux
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install rsync
|
|
||||||
run: sudo apt-get install rsync
|
|
||||||
continue-on-error: true
|
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
- name: Install Yarn
|
|
||||||
run: npm install -g yarn
|
|
||||||
- run: yarn
|
|
||||||
continue-on-error: true
|
|
||||||
- name: Set environment from the example
|
|
||||||
run: cp .env.sample .env
|
|
||||||
- run: yarn storybook:build
|
|
||||||
- name: Deploy branch to CI www
|
|
||||||
continue-on-error: true
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "nym-connect/desktop/storybook-static/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/nym-connect-${{ env.GITHUB_REF_SLUG }}
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
- name: Matrix - Node Install
|
|
||||||
run: npm install
|
|
||||||
working-directory: .github/workflows/support-files
|
|
||||||
- name: Matrix - Send Notification
|
|
||||||
env:
|
|
||||||
NYM_NOTIFICATION_KIND: nym-connect
|
|
||||||
NYM_PROJECT_NAME: "nym-connect"
|
|
||||||
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
|
||||||
NYM_CI_WWW_LOCATION: "nym-connect-${{ env.GITHUB_REF_SLUG }}"
|
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
|
||||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
|
||||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
|
||||||
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
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
name: Nym Connect - desktop (Rust)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- "nym-connect/desktop/src-tauri/**"
|
|
||||||
- "nym-connect/desktop/src-tauri/Cargo.toml"
|
|
||||||
- "clients/client-core/**"
|
|
||||||
- "clients/socks5/**"
|
|
||||||
- "common/**"
|
|
||||||
- "gateway/gateway-requests/**"
|
|
||||||
- "contracts/vesting/**"
|
|
||||||
- "nym-api/nym-api-requests/**"
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "nym-connect/desktop/src-tauri/**"
|
|
||||||
- "nym-connect/desktop/src-tauri/Cargo.toml"
|
|
||||||
- "clients/client-core/**"
|
|
||||||
- "clients/socks5/**"
|
|
||||||
- "common/**"
|
|
||||||
- "gateway/gateway-requests/**"
|
|
||||||
- "contracts/vesting/**"
|
|
||||||
- "nym-api/nym-api-requests/**"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: [self-hosted, custom-linux]
|
|
||||||
env:
|
|
||||||
RUSTC_WRAPPER: /home/ubuntu/.cargo/bin/sccache
|
|
||||||
steps:
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools libayatana-appindicator3-dev
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Install rust toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
|
||||||
|
|
||||||
- name: Build all binaries
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --manifest-path nym-connect/desktop/Cargo.toml --workspace
|
|
||||||
|
|
||||||
- name: Run all tests
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --manifest-path nym-connect/desktop/Cargo.toml --workspace
|
|
||||||
|
|
||||||
- name: Check formatting
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --manifest-path nym-connect/desktop/Cargo.toml --all -- --check
|
|
||||||
|
|
||||||
- uses: actions-rs/clippy-check@v1
|
|
||||||
name: Clippy checks
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --manifest-path nym-connect/desktop/Cargo.toml --workspace --all-features
|
|
||||||
|
|
||||||
- name: Run clippy
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --manifest-path nym-connect/desktop/Cargo.toml --workspace --all-features -- -D warnings
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
name: Nym Connect - mobile (Rust)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- "nym-connect/mobile/src-tauri/**"
|
|
||||||
- "nym-connect/mobile/src-tauri/Cargo.toml"
|
|
||||||
- "!nym-connect/mobile/src-tauri/gen/**"
|
|
||||||
- "clients/client-core/**"
|
|
||||||
- "clients/socks5/**"
|
|
||||||
- "common/**"
|
|
||||||
- "gateway/gateway-requests/**"
|
|
||||||
- "contracts/vesting/**"
|
|
||||||
- "nym-api/nym-api-requests/**"
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "nym-connect/mobile/src-tauri/**"
|
|
||||||
- "nym-connect/mobile/src-tauri/Cargo.toml"
|
|
||||||
- "!nym-connect/mobile/src-tauri/gen/**"
|
|
||||||
- "clients/client-core/**"
|
|
||||||
- "clients/socks5/**"
|
|
||||||
- "common/**"
|
|
||||||
- "gateway/gateway-requests/**"
|
|
||||||
- "contracts/vesting/**"
|
|
||||||
- "nym-api/nym-api-requests/**"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
#runs-on: [self-hosted, custom-linux]
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
#env:
|
|
||||||
#RUSTC_WRAPPER: /home/ubuntu/.cargo/bin/sccache
|
|
||||||
#defaults:
|
|
||||||
#run:
|
|
||||||
#working-directory: nym-connect/mobile/src-tauri/
|
|
||||||
steps:
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get -y install \
|
|
||||||
libwebkit2gtk-4.1-dev \
|
|
||||||
build-essential \
|
|
||||||
curl \
|
|
||||||
wget \
|
|
||||||
libssl-dev \
|
|
||||||
libgtk-3-dev \
|
|
||||||
squashfs-tools \
|
|
||||||
libayatana-appindicator3-dev \
|
|
||||||
librsvg2-dev \
|
|
||||||
libsoup-3.0-dev \
|
|
||||||
libjavascriptcoregtk-4.1-dev
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: clippy, rustfmt
|
|
||||||
|
|
||||||
- name: Check formatting
|
|
||||||
run: cargo fmt --manifest-path nym-connect/mobile/src-tauri/Cargo.toml -- --check
|
|
||||||
|
|
||||||
- name: Build all binaries
|
|
||||||
run: cargo build --manifest-path nym-connect/mobile/src-tauri/Cargo.toml
|
|
||||||
|
|
||||||
- name: Run all tests
|
|
||||||
run: cargo test --manifest-path nym-connect/mobile/src-tauri/Cargo.toml
|
|
||||||
|
|
||||||
- name: Clippy
|
|
||||||
run: cargo clippy --manifest-path nym-connect/mobile/src-tauri/Cargo.toml --all-targets -- -D warnings
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"rust":"stable",
|
|
||||||
"runOnEvent":"always"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rust":"beta",
|
|
||||||
"runOnEvent":"pull_request"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rust":"nightly",
|
|
||||||
"runOnEvent":"pull_request"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
name: Build release of Nym smart contracts
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-contracts-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
||||||
runs-on: [self-hosted, custom-runner-linux]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: wasm32-unknown-unknown
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
|
||||||
|
|
||||||
- name: Install wasm-opt
|
|
||||||
run: cargo install --version 0.112.0 wasm-opt
|
|
||||||
|
|
||||||
- name: Build release contracts
|
|
||||||
run: make wasm
|
|
||||||
|
|
||||||
- name: Upload Mixnet Contract Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: mixnet_contract.wasm
|
|
||||||
path: contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
- name: Upload Vesting Contract Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: vesting_contract.wasm
|
|
||||||
path: contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
- name: Upload to release based on tag name
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm
|
|
||||||
contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
name: Contracts
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'contracts/**'
|
|
||||||
- 'common/**'
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- 'contracts/**'
|
|
||||||
- 'common/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
matrix_prep:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
outputs:
|
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
||||||
steps:
|
|
||||||
# creates the matrix strategy from build_matrix_includes.json
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- id: set-matrix
|
|
||||||
uses: JoshuaTheMiller/conditional-build-matrix@main
|
|
||||||
with:
|
|
||||||
inputFile: '.github/workflows/contract_matrix_includes.json'
|
|
||||||
filter: '[?runOnEvent==`${{ github.event_name }}` || runOnEvent==`always`]'
|
|
||||||
contracts:
|
|
||||||
# since it's going to be compiled into wasm, there's absolutely
|
|
||||||
# no point in running CI on different OS-es
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
|
||||||
needs: matrix_prep
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: ${{ matrix.rust }}
|
|
||||||
target: wasm32-unknown-unknown
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
env:
|
|
||||||
RUSTFLAGS: '-C link-arg=-s'
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --manifest-path contracts/Cargo.toml --workspace --target wasm32-unknown-unknown
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --manifest-path contracts/Cargo.toml
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --manifest-path contracts/Cargo.toml --all -- --check
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.rust != 'nightly' }}
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --manifest-path contracts/Cargo.toml --workspace --all-targets -- -D warnings
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
name: Greetings
|
|
||||||
|
|
||||||
on: [pull_request_target, issues]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
greeting:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/first-interaction@v1
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
issue-message: 'Thank you for raising this issue'
|
|
||||||
pr-message: 'Thank you for making this first PR'
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
name: Mixnet Contract
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
mixnet-contract:
|
||||||
|
# since it's going to be compiled into wasm, there's absolutely
|
||||||
|
# no point in running CI on different OS-es
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
rust: [ stable, beta, nightly ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: ${{ matrix.rust }}
|
||||||
|
target: wasm32-unknown-unknown
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: --manifest-path contracts/mixnet/Cargo.toml --target wasm32-unknown-unknown
|
||||||
|
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --manifest-path contracts/mixnet/Cargo.toml
|
||||||
|
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: --manifest-path contracts/mixnet/Cargo.toml -- --check
|
||||||
|
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
if: ${{ matrix.rust != 'nightly' }}
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: --manifest-path contracts/mixnet/Cargo.toml -- -D warnings
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
name: Linting for Network Explorer (eslint/prettier)
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'explorer/**'
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: explorer
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: custom-runner-linux
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
- name: Setup yarn
|
|
||||||
run: npm install -g yarn
|
|
||||||
- name: Run ESLint
|
|
||||||
# GitHub should automatically annotate the PR
|
|
||||||
run: yarn && yarn lint
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
name: CI for Network Explorer
|
name: CI for Network Explorer
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- 'explorer/**'
|
- 'explorer/**'
|
||||||
@@ -12,29 +11,21 @@ defaults:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: custom-runner-linux
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install rsync
|
- name: Install rsync
|
||||||
run: sudo apt-get install rsync
|
run: sudo apt-get install rsync
|
||||||
continue-on-error: true
|
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: '14'
|
||||||
- name: Setup yarn
|
- run: npm install
|
||||||
run: npm install -g yarn
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Build shared packages
|
- run: npm run test
|
||||||
run: cd .. && yarn && yarn build
|
continue-on-error: true
|
||||||
- name: Set environment from the example
|
- run: npm run build
|
||||||
run: cp .env.prod .env
|
|
||||||
# - run: yarn test
|
|
||||||
# continue-on-error: true
|
|
||||||
- run: yarn && yarn build
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- run: yarn storybook:build
|
|
||||||
name: Build storybook
|
|
||||||
- name: Deploy branch to CI www
|
- name: Deploy branch to CI www
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: easingthemes/ssh-deploy@main
|
uses: easingthemes/ssh-deploy@main
|
||||||
@@ -44,48 +35,22 @@ jobs:
|
|||||||
SOURCE: "explorer/dist/"
|
SOURCE: "explorer/dist/"
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/network-explorer-${{ env.GITHUB_REF_SLUG }}
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/${{ env.GITHUB_REF_SLUG }}
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
- name: Deploy storybook to CI www
|
- name: Keybase - Node Install
|
||||||
continue-on-error: true
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "explorer/storybook-static/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/ne-sb-${{ env.GITHUB_REF_SLUG }}
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
- name: Matrix - Node Install
|
|
||||||
run: npm install
|
run: npm install
|
||||||
working-directory: .github/workflows/support-files
|
working-directory: .github/workflows/support-files/messages
|
||||||
- name: Matrix - Send Notification
|
- name: Keybase - Send Notification
|
||||||
env:
|
env:
|
||||||
NYM_NOTIFICATION_KIND: network-explorer
|
|
||||||
NYM_PROJECT_NAME: "Network Explorer"
|
NYM_PROJECT_NAME: "Network Explorer"
|
||||||
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
||||||
NYM_CI_WWW_LOCATION: "network-explorer-${{ env.GITHUB_REF_SLUG }}"
|
|
||||||
NYM_CI_WWW_LOCATION_STORYBOOK: "ne-sb-${{ env.GITHUB_REF_SLUG }}"
|
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
KEYBASE_NYMBOT_USERNAME: "${{ secrets.KEYBASE_NYMBOT_USERNAME }}"
|
||||||
|
KEYBASE_NYMBOT_PAPERKEY: "${{ secrets.KEYBASE_NYMBOT_PAPERKEY }}"
|
||||||
|
KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}"
|
||||||
|
KEYBASE_NYM_CHANNEL: "ci-network-explorer"
|
||||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
|
||||||
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
|
uses: docker://keybaseio/client:stable-node
|
||||||
with:
|
with:
|
||||||
args: .github/workflows/support-files/notifications/entry_point.sh
|
args: .github/workflows/support-files/messages/entry_point_notifications.sh
|
||||||
- name: Deploy
|
|
||||||
if: github.event_name == 'workflow_dispatch'
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CD_PROD_NE_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "explorer/dist/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CD_PROD_NE_REMOTE_HOST }}
|
|
||||||
REMOTE_USER: ${{ secrets.CD_PROD_NE_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CD_PROD_NE_REMOTE_TARGET }}
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
|
|||||||
@@ -1,176 +0,0 @@
|
|||||||
name: Nightly builds
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '14 1 * * *'
|
|
||||||
jobs:
|
|
||||||
matrix_prep:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
outputs:
|
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
||||||
steps:
|
|
||||||
# creates the matrix strategy from nightly_build_matrix_includes.json
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- id: set-matrix
|
|
||||||
uses: JoshuaTheMiller/conditional-build-matrix@main
|
|
||||||
with:
|
|
||||||
inputFile: '.github/workflows/nightly_build_matrix_includes.json'
|
|
||||||
filter: '[?runOnEvent==`${{ github.event_name }}` || runOnEvent==`always`]'
|
|
||||||
build:
|
|
||||||
needs: matrix_prep
|
|
||||||
strategy:
|
|
||||||
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
continue-on-error: ${{ matrix.rust == 'nightly' || matrix.rust == 'beta' || matrix.rust == 'stable' }}
|
|
||||||
steps:
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
|
|
||||||
continue-on-error: true
|
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
|
||||||
|
|
||||||
- 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 all binaries
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Reclaim some disk space
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- name: Build all examples
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace --examples
|
|
||||||
|
|
||||||
- name: Reclaim some disk space
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- name: Run all tests
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Reclaim some disk space
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- name: Run expensive tests
|
|
||||||
if: github.ref == 'refs/heads/develop' || github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'master'
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --workspace -- --ignored
|
|
||||||
|
|
||||||
- name: Reclaim some disk space
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- uses: actions-rs/clippy-check@v1
|
|
||||||
name: Clippy checks
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Run clippy
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.rust != 'nightly' }}
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --workspace --all-targets -- -D warnings
|
|
||||||
|
|
||||||
- name: Reclaim some disk space
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
# nym-wallet (the rust part)
|
|
||||||
- name: Build nym-wallet rust code
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace
|
|
||||||
|
|
||||||
- name: Run nym-wallet tests
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace
|
|
||||||
|
|
||||||
- name: Check nym-wallet formatting
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --all -- --check
|
|
||||||
|
|
||||||
- name: Run clippy for nym-wallet
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.rust != 'nightly' }}
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace --all-targets -- -D warnings
|
|
||||||
|
|
||||||
notification:
|
|
||||||
needs: build
|
|
||||||
runs-on: custom-runner-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: 16
|
|
||||||
- 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
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"os":"ubuntu-20.04",
|
|
||||||
"rust":"stable",
|
|
||||||
"runOnEvent":"schedule"
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"os":"windows-latest",
|
|
||||||
"rust":"stable",
|
|
||||||
"runOnEvent":"schedule"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"os":"macos-latest",
|
|
||||||
"rust":"stable",
|
|
||||||
"runOnEvent":"schedule"
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"os":"ubuntu-20.04",
|
|
||||||
"rust":"beta",
|
|
||||||
"runOnEvent":"schedule"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"os":"windows-latest",
|
|
||||||
"rust":"beta",
|
|
||||||
"runOnEvent":"schedule"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"os":"macos-latest",
|
|
||||||
"rust":"beta",
|
|
||||||
"runOnEvent":"schedule"
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"os":"ubuntu-20.04",
|
|
||||||
"rust":"nightly",
|
|
||||||
"runOnEvent":"schedule"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"os":"windows-latest",
|
|
||||||
"rust":"nightly",
|
|
||||||
"runOnEvent":"schedule"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"os":"macos-latest",
|
|
||||||
"rust":"nightly",
|
|
||||||
"runOnEvent":"schedule"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,191 +0,0 @@
|
|||||||
name: Nightly builds on latest release
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '14 2 * * *'
|
|
||||||
jobs:
|
|
||||||
matrix_prep:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
outputs:
|
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
||||||
steps:
|
|
||||||
# creates the matrix strategy from nightly_build_matrix_includes.json
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- id: set-matrix
|
|
||||||
uses: JoshuaTheMiller/conditional-build-matrix@main
|
|
||||||
with:
|
|
||||||
inputFile: '.github/workflows/nightly_build_matrix_includes.json'
|
|
||||||
filter: '[?runOnEvent==`${{ github.event_name }}` || runOnEvent==`always`]'
|
|
||||||
get_release:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs: matrix_prep
|
|
||||||
outputs:
|
|
||||||
output1: ${{ steps.step2.outputs.latest_release }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Fetch all branches
|
|
||||||
run: git fetch --all
|
|
||||||
- name: Set output variable to latest release branch
|
|
||||||
id: step2
|
|
||||||
run: echo "latest_release=$(git branch -r | grep -E 'release/v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1 | sed 's/ origin\///')" >> $GITHUB_OUTPUT
|
|
||||||
build:
|
|
||||||
needs: [get_release,matrix_prep]
|
|
||||||
strategy:
|
|
||||||
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
continue-on-error: ${{ matrix.rust == 'nightly' || matrix.rust == 'beta' || matrix.rust == 'stable' }}
|
|
||||||
steps:
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
|
|
||||||
continue-on-error: true
|
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
|
||||||
|
|
||||||
- name: Check out latest release branch
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: ${{needs.get_release.outputs.output1}}
|
|
||||||
|
|
||||||
- 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 all binaries
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Reclaim some disk space
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- name: Build all examples
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace --examples
|
|
||||||
|
|
||||||
- name: Reclaim some disk space
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- name: Run all tests
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Reclaim some disk space
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- name: Run expensive tests
|
|
||||||
if: github.ref == 'refs/heads/develop' || github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'master'
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --workspace -- --ignored
|
|
||||||
|
|
||||||
- name: Reclaim some disk space
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- uses: actions-rs/clippy-check@v1
|
|
||||||
name: Clippy checks
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Run clippy
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.rust != 'nightly' }}
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --workspace --all-targets -- -D warnings
|
|
||||||
|
|
||||||
- name: Reclaim some disk space
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
# nym-wallet (the rust part)
|
|
||||||
- name: Build nym-wallet rust code
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace
|
|
||||||
|
|
||||||
- name: Run nym-wallet tests
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace
|
|
||||||
|
|
||||||
- name: Check nym-wallet formatting
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --all -- --check
|
|
||||||
|
|
||||||
- name: Run clippy for nym-wallet
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.rust != 'nightly' }}
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace --all-targets -- -D warnings
|
|
||||||
|
|
||||||
notification:
|
|
||||||
needs: [build,get_release]
|
|
||||||
runs-on: custom-runner-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: 16
|
|
||||||
- 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 on latest release"
|
|
||||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
|
||||||
GIT_BRANCH_NAME: "${{needs.get_release.outputs.output1}}"
|
|
||||||
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
|
|
||||||
@@ -1,191 +0,0 @@
|
|||||||
name: Nightly builds on second latest release
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '24 2 * * *'
|
|
||||||
jobs:
|
|
||||||
matrix_prep:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
outputs:
|
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
||||||
steps:
|
|
||||||
# creates the matrix strategy from nightly_build_matrix_includes.json
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- id: set-matrix
|
|
||||||
uses: JoshuaTheMiller/conditional-build-matrix@main
|
|
||||||
with:
|
|
||||||
inputFile: '.github/workflows/nightly_build_matrix_includes.json'
|
|
||||||
filter: '[?runOnEvent==`${{ github.event_name }}` || runOnEvent==`always`]'
|
|
||||||
get_release:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs: matrix_prep
|
|
||||||
outputs:
|
|
||||||
output1: ${{ steps.step2.outputs.latest_release }}
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Fetch all branches
|
|
||||||
run: git fetch --all
|
|
||||||
- name: Set output variable to latest release branch
|
|
||||||
id: step2
|
|
||||||
run: echo "latest_release=$(git branch -r | grep -E 'release/v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 2 | head -n 1 | sed 's/ origin\///')" >> $GITHUB_OUTPUT
|
|
||||||
build:
|
|
||||||
needs: [get_release,matrix_prep]
|
|
||||||
strategy:
|
|
||||||
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
continue-on-error: ${{ matrix.rust == 'nightly' || matrix.rust == 'beta' || matrix.rust == 'stable' }}
|
|
||||||
steps:
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
|
|
||||||
continue-on-error: true
|
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
|
||||||
|
|
||||||
- name: Check out latest release branch
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: ${{needs.get_release.outputs.output1}}
|
|
||||||
|
|
||||||
- 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 all binaries
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Reclaim some disk space (because Windows is being annoying)
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- name: Build all examples
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace --examples
|
|
||||||
|
|
||||||
- name: Reclaim some disk space (because Windows is being annoying)
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- name: Run all tests
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Reclaim some disk space (because Windows is being annoying)
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- name: Run expensive tests
|
|
||||||
if: github.ref == 'refs/heads/develop' || github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'master'
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --workspace -- --ignored
|
|
||||||
|
|
||||||
- name: Reclaim some disk space (because Windows is being annoying)
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
- uses: actions-rs/clippy-check@v1
|
|
||||||
name: Clippy checks
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --workspace
|
|
||||||
|
|
||||||
- name: Run clippy
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.rust != 'nightly' }}
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --workspace --all-targets -- -D warnings
|
|
||||||
|
|
||||||
- name: Reclaim some disk space
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'ubuntu-20.04' }}
|
|
||||||
with:
|
|
||||||
command: clean
|
|
||||||
|
|
||||||
# nym-wallet (the rust part)
|
|
||||||
- name: Build nym-wallet rust code
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace
|
|
||||||
|
|
||||||
- name: Run nym-wallet tests
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace
|
|
||||||
|
|
||||||
- name: Check nym-wallet formatting
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --all -- --check
|
|
||||||
|
|
||||||
- name: Run clippy for nym-wallet
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
if: ${{ matrix.rust != 'nightly' }}
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace --all-targets -- -D warnings
|
|
||||||
|
|
||||||
notification:
|
|
||||||
needs: [build,get_release]
|
|
||||||
runs-on: custom-runner-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: 16
|
|
||||||
- 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 on latest release"
|
|
||||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
|
||||||
GIT_BRANCH_NAME: "${{needs.get_release.outputs.output1}}"
|
|
||||||
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
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
name: Publish Nym Connect - desktop (MacOS)
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: nym-connect/desktop
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-tauri:
|
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [macos-latest]
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Node v16
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: Install the Apple developer certificate for code signing
|
|
||||||
env:
|
|
||||||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
|
||||||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
||||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
# create variables
|
|
||||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
|
||||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
|
||||||
|
|
||||||
# import certificate and provisioning profile from secrets
|
|
||||||
echo -n "$APPLE_CERTIFICATE" | base64 --decode --output $CERTIFICATE_PATH
|
|
||||||
|
|
||||||
# create temporary keychain
|
|
||||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
|
||||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
|
||||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
|
||||||
|
|
||||||
# import certificate to keychain
|
|
||||||
security import $CERTIFICATE_PATH -P "$APPLE_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
|
||||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
|
||||||
|
|
||||||
- name: Create env file
|
|
||||||
uses: timheuer/base64-to-file@v1.1
|
|
||||||
with:
|
|
||||||
fileName: '.env'
|
|
||||||
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
|
||||||
|
|
||||||
- name: Install app dependencies and build it
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
|
|
||||||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
|
||||||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
||||||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_IDENTITY_ID }}
|
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
||||||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
||||||
run: yarn && yarn build
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: nym-connect_1.0.0_x64.dmg
|
|
||||||
path: nym-connect/desktop/target/release/bundle/dmg/nym-connect_1.0.0_x64.dmg
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: Clean up keychain
|
|
||||||
if: ${{ always() }}
|
|
||||||
run: |
|
|
||||||
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
|
||||||
|
|
||||||
- name: Upload to release based on tag name
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
nym-connect/desktop/target/release/bundle/dmg/*.dmg
|
|
||||||
nym-connect/desktop/target/release/bundle/macos/*.app.tar.gz*
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
name: Publish Nym Connect - desktop (Ubuntu)
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: nym-connect/desktop
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-tauri:
|
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [custom-runner-linux]
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Tauri dependencies
|
|
||||||
run: >
|
|
||||||
sudo apt-get update &&
|
|
||||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Node v16
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: Install app dependencies
|
|
||||||
run: yarn
|
|
||||||
- name: Create env file
|
|
||||||
uses: timheuer/base64-to-file@v1.1
|
|
||||||
with:
|
|
||||||
fileName: '.env'
|
|
||||||
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
|
||||||
|
|
||||||
- name: Build app
|
|
||||||
run: yarn build
|
|
||||||
env:
|
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: nym-connect.AppImage.tar.gz
|
|
||||||
path: nym-connect/desktop/target/release/bundle/appimage/nym-connect_1.0.0_amd64.AppImage
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: Upload to release based on tag name
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
nym-connect/desktop/target/release/bundle/appimage/*.AppImage
|
|
||||||
nym-connect/desktop/target/release/bundle/appimage/*.AppImage.tar.gz*
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
name: Publish Nym Connect - desktop (Windows 10)
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: nym-connect/desktop
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-tauri:
|
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [windows10]
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- name: Clean up first
|
|
||||||
continue-on-error: true
|
|
||||||
working-directory: .
|
|
||||||
run: |
|
|
||||||
cd ..
|
|
||||||
del /s /q /A:H nym
|
|
||||||
rmdir /s /q nym
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Import signing certificate
|
|
||||||
env:
|
|
||||||
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
|
||||||
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
New-Item -ItemType directory -Path certificate
|
|
||||||
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE
|
|
||||||
certutil -decode certificate/tempCert.txt certificate/certificate.pfx
|
|
||||||
Remove-Item -path certificate -include tempCert.txt
|
|
||||||
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText)
|
|
||||||
|
|
||||||
- name: Node v16
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
|
|
||||||
- name: Create env file
|
|
||||||
uses: timheuer/base64-to-file@v1.1
|
|
||||||
with:
|
|
||||||
fileName: '.env'
|
|
||||||
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
|
||||||
|
|
||||||
- name: Install app dependencies
|
|
||||||
run: yarn --network-timeout 100000
|
|
||||||
|
|
||||||
- name: Build and sign it
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ENABLE_CODE_SIGNING: ${{ secrets.WINDOWS_CERTIFICATE }}
|
|
||||||
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
|
||||||
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: nym-connect_1.0.0_x64_en-US.msi
|
|
||||||
path: nym-connect/desktop/target/release/bundle/msi/nym-connect_1.0.0_x64_en-US.msi
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: Upload to release based on tag name
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
nym-connect/desktop/target/release/bundle/msi/*.msi
|
|
||||||
nym-connect/desktop/target/release/bundle/msi/*.msi.zip*
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
name: Publish Nym binaries
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
add_tokio_unstable:
|
|
||||||
description: 'True to add RUSTFLAGS="--cfg tokio_unstable"'
|
|
||||||
required: true
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
env:
|
|
||||||
NETWORK: mainnet
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-nym:
|
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [custom-runner-linux]
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Sets env vars for tokio if set in manual dispatch inputs
|
|
||||||
run: |
|
|
||||||
echo 'RUSTFLAGS="--cfg tokio_unstable"' >> $GITHUB_ENV
|
|
||||||
if: github.event_name == 'workflow_dispatch' && inputs.add_tokio_unstable == true
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
|
|
||||||
- name: Build all binaries
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --workspace --release
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: my-artifact
|
|
||||||
path: |
|
|
||||||
target/release/explorer-api
|
|
||||||
target/release/nym-client
|
|
||||||
target/release/nym-gateway
|
|
||||||
target/release/nym-mixnode
|
|
||||||
target/release/nym-socks5-client
|
|
||||||
target/release/nym-api
|
|
||||||
target/release/nym-network-requester
|
|
||||||
target/release/nym-network-statistics
|
|
||||||
target/release/nym-cli
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: Upload to release based on tag name
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
target/release/explorer-api
|
|
||||||
target/release/nym-client
|
|
||||||
target/release/nym-gateway
|
|
||||||
target/release/nym-mixnode
|
|
||||||
target/release/nym-socks5-client
|
|
||||||
target/release/nym-api
|
|
||||||
target/release/nym-network-requester
|
|
||||||
target/release/nym-network-statistics
|
|
||||||
target/release/nym-cli
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
name: Publish Nym Wallet (MacOS)
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: nym-wallet
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-tauri:
|
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [macos-latest]
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Node v16
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: Install the Apple developer certificate for code signing
|
|
||||||
env:
|
|
||||||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
|
||||||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
||||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
# create variables
|
|
||||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
|
||||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
|
||||||
|
|
||||||
# import certificate and provisioning profile from secrets
|
|
||||||
echo -n "$APPLE_CERTIFICATE" | base64 --decode --output $CERTIFICATE_PATH
|
|
||||||
|
|
||||||
# create temporary keychain
|
|
||||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
|
||||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
|
||||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
|
||||||
|
|
||||||
# import certificate to keychain
|
|
||||||
security import $CERTIFICATE_PATH -P "$APPLE_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
|
||||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
|
||||||
|
|
||||||
- name: Create env file
|
|
||||||
uses: timheuer/base64-to-file@v1.1
|
|
||||||
with:
|
|
||||||
fileName: '.env'
|
|
||||||
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
|
||||||
|
|
||||||
- name: Install app dependencies and build it
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
|
|
||||||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
|
||||||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
||||||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_IDENTITY_ID }}
|
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
||||||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
||||||
run: yarn && yarn build
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: nym-wallet.app.tar.gz
|
|
||||||
path: nym-wallet/target/release/bundle/macos/nym-wallet.app.tar.gz
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
- name: Clean up keychain
|
|
||||||
if: ${{ always() }}
|
|
||||||
run: |
|
|
||||||
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
|
||||||
|
|
||||||
- name: Upload to release based on tag name
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
nym-wallet/target/release/bundle/dmg/*.dmg
|
|
||||||
nym-wallet/target/release/bundle/macos/*.app.tar.gz*
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
name: Publish Nym Wallet (Ubuntu)
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: nym-wallet
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-tauri:
|
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [custom-runner-linux]
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Tauri dependencies
|
|
||||||
run: >
|
|
||||||
sudo apt-get update &&
|
|
||||||
sudo apt-get install -y webkit2gtk-4.0
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Node v16
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: Install app dependencies
|
|
||||||
run: yarn
|
|
||||||
- name: Create env file
|
|
||||||
uses: timheuer/base64-to-file@v1.1
|
|
||||||
with:
|
|
||||||
fileName: '.env'
|
|
||||||
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
|
||||||
|
|
||||||
- name: Build app
|
|
||||||
run: yarn build
|
|
||||||
env:
|
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
||||||
- name: Upload to release based on tag name
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
nym-wallet/target/release/bundle/appimage/*.AppImage
|
|
||||||
nym-wallet/target/release/bundle/appimage/*.AppImage.tar.gz*
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
name: Publish Nym Wallet (Windows 10)
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: nym-wallet
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-tauri:
|
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [windows10]
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- name: Clean up first
|
|
||||||
continue-on-error: true
|
|
||||||
working-directory: .
|
|
||||||
run: |
|
|
||||||
cd ..
|
|
||||||
del /s /q /A:H nym
|
|
||||||
rmdir /s /q nym
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Import signing certificate
|
|
||||||
env:
|
|
||||||
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
|
||||||
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
New-Item -ItemType directory -Path certificate
|
|
||||||
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE
|
|
||||||
certutil -decode certificate/tempCert.txt certificate/certificate.pfx
|
|
||||||
Remove-Item -path certificate -include tempCert.txt
|
|
||||||
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText)
|
|
||||||
|
|
||||||
- name: Node v16
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
|
|
||||||
- name: Create env file
|
|
||||||
uses: timheuer/base64-to-file@v1.1
|
|
||||||
with:
|
|
||||||
fileName: '.env'
|
|
||||||
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
|
||||||
|
|
||||||
- name: Install app dependencies
|
|
||||||
run: yarn --network-timeout 100000
|
|
||||||
|
|
||||||
- name: Build and sign it
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ENABLE_CODE_SIGNING: ${{ secrets.WINDOWS_CERTIFICATE }}
|
|
||||||
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
|
||||||
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: nym-wallet_1.0.0_x64_en-US.msi
|
|
||||||
path: nym-wallet/target/release/bundle/msi/nym-wallet_1.*.msi
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: Upload to release based on tag name
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
nym-wallet/target/release/bundle/msi/*.msi
|
|
||||||
nym-wallet/target/release/bundle/msi/*.msi.zip*
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
name: Release Nym Wallet
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
nym_wallet_version:
|
|
||||||
description: 'The version of the Nym Wallet to release'
|
|
||||||
default: '1.0.x'
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
jobs:
|
|
||||||
create-release:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-20.04]
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Create release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
body: >-
|
|
||||||
This is a pre-release
|
|
||||||
|
|
||||||
Download the wallet for your platform:
|
|
||||||
|
|
||||||
- [Linux](https://github.com/nymtech/nym/releases/download/nym-wallet-v${{ inputs.nym_wallet_version}}/nym-wallet_v${{ inputs.nym_wallet_version}}_amd64_ubuntu20.04.AppImage)
|
|
||||||
- [MacOS](https://github.com/nymtech/nym/releases/download/nym-wallet-v${{ inputs.nym_wallet_version}}/nym-wallet_v${{ inputs.nym_wallet_version}}_x64_macos_11.dmg)
|
|
||||||
- [Windows](https://github.com/nymtech/nym/releases/download/nym-wallet-v${{ inputs.nym_wallet_version}}/nym-wallet_v${{ inputs.nym_wallet_version}}_x64_windows.msi)
|
|
||||||
prerelease: true
|
|
||||||
name: Nym Wallet v${{ inputs.nym_wallet_version}}
|
|
||||||
tag_name: nym-wallet-v${{ inputs.nym_wallet_version}}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
name: Nym Wallet Storybook
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'nym-wallet/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: custom-runner-linux
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install rsync
|
|
||||||
run: sudo apt-get install rsync
|
|
||||||
continue-on-error: true
|
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
- name: Setup yarn
|
|
||||||
run: npm install -g yarn
|
|
||||||
- name: Build dependencies
|
|
||||||
run: yarn && yarn build
|
|
||||||
- name: Build storybook
|
|
||||||
run: yarn storybook:build
|
|
||||||
working-directory: ./nym-wallet
|
|
||||||
- name: Deploy branch to CI www (storybook)
|
|
||||||
continue-on-error: true
|
|
||||||
uses: easingthemes/ssh-deploy@main
|
|
||||||
env:
|
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
|
||||||
ARGS: "-rltgoDzvO --delete"
|
|
||||||
SOURCE: "nym-wallet/storybook-static/"
|
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/wallet-${{ env.GITHUB_REF_SLUG }}
|
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
|
||||||
- name: Matrix - Node Install
|
|
||||||
run: npm install
|
|
||||||
working-directory: .github/workflows/support-files
|
|
||||||
- name: Matrix - Send Notification
|
|
||||||
env:
|
|
||||||
NYM_NOTIFICATION_KIND: nym-wallet
|
|
||||||
NYM_PROJECT_NAME: "nym-wallet"
|
|
||||||
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
|
||||||
NYM_CI_WWW_LOCATION: "wallet-${{ env.GITHUB_REF_SLUG }}"
|
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
|
||||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
|
||||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
|
||||||
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
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
name: Webdriverio tests for nym wallet
|
name: Webdriverio tests for nym wallet
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- "nym-wallet/**"
|
- 'tauri-wallet/**'
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: nym-wallet
|
working-directory: tauri-wallet
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: wallet tests
|
name: wallet tests
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
@@ -26,46 +26,45 @@ jobs:
|
|||||||
libappindicator3-dev
|
libappindicator3-dev
|
||||||
webkit2gtk-driver
|
webkit2gtk-driver
|
||||||
xvfb
|
xvfb
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Install minimal stable
|
- name: Install minimal stable
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- name: Node v16
|
- name: Node v16
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16.x
|
||||||
|
|
||||||
- name: Install yarn for building application
|
- name: Install yarn for building application
|
||||||
run: yarn install
|
run: yarn install
|
||||||
|
|
||||||
- name: Build application
|
- name: Build application
|
||||||
run: yarn run webpack:build & yarn run tauri:build
|
run: yarn run webpack:build & yarn run tauri:build
|
||||||
|
|
||||||
- name: Check binary exists
|
- name: Check binary exists
|
||||||
run: |
|
run: |
|
||||||
cd target/release/
|
cd target/release/
|
||||||
(test -f nym-wallet && echo nym binary exists) || echo wallet does not exist
|
(test -f nym-wallet && echo nym binary exists) || echo wallet does not exist
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install
|
run: yarn install
|
||||||
working-directory: nym-wallet/webdriver
|
working-directory: tauri-wallet/webdriver
|
||||||
|
|
||||||
- name: Remove existing user datafile
|
- name: Remove existing user datafile
|
||||||
uses: JesseTG/rm@v1.0.2
|
uses: JesseTG/rm@v1.0.2
|
||||||
with:
|
with:
|
||||||
path: nym-wallet/webdriver/common/data/user-data.json
|
path: tauri-wallet/webdriver/common/data/user-data.json
|
||||||
|
|
||||||
- name: Create user data json file
|
- name: Create user data json file
|
||||||
id: create-json
|
id: create-json
|
||||||
uses: jsdaniell/create-json@1.1.2
|
uses: jsdaniell/create-json@1.1.2
|
||||||
with:
|
with:
|
||||||
name: "user-data.json"
|
name: "user-data.json"
|
||||||
json: ${{ secrets.WALLET_USERDATA }}
|
json: ${{ secrets.WALLET_USERDATA }}
|
||||||
dir: "nym-wallet/webdriver/common/data/"
|
dir: 'tauri-wallet/webdriver/common/data/'
|
||||||
|
|
||||||
- name: Install tauri-driver
|
- name: Install tauri-driver
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
@@ -74,5 +73,5 @@ jobs:
|
|||||||
args: tauri-driver
|
args: tauri-driver
|
||||||
|
|
||||||
- name: Launch tests
|
- name: Launch tests
|
||||||
run: xvfb-run yarn test:runall
|
run: xvfb-run yarn test:newuser
|
||||||
working-directory: nym-wallet/webdriver
|
working-directory: tauri-wallet/webdriver
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
name: CI for Nym API Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- "nym-api/**"
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: nym-api/tests
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: nym-api tests
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Install npm
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Node v18
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 18.1.0
|
|
||||||
|
|
||||||
- name: Install yarn
|
|
||||||
run: yarn install
|
|
||||||
|
|
||||||
- name: Run yarn
|
|
||||||
run: yarn
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: yarn test:qa
|
|
||||||
working-directory: nym-api/tests
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
MATRIX_SERVER=
|
|
||||||
MATRIX_ROOM=
|
|
||||||
MATRIX_ROOM_OF_SHAME=
|
|
||||||
MATRIX_USER_ID=
|
|
||||||
MATRIX_TOKEN=
|
|
||||||
MATRIX_DEVICE_ID=
|
|
||||||
|
|
||||||
NYM_NOTIFICATION_KIND=nightly
|
|
||||||
NYM_PROJECT_NAME=Nightly Build
|
|
||||||
|
|
||||||
#----------------------------------------------------------------
|
|
||||||
# Custom GitHub Actions mock env vars
|
|
||||||
IS_SUCCESS=true
|
|
||||||
|
|
||||||
#----------------------------------------------------------------
|
|
||||||
# GitHub Actions context mock env vars
|
|
||||||
GITHUB_SHA=abcdef
|
|
||||||
GITHUB_RUN_ID=123456
|
|
||||||
GITHUB_REPOSITORY=nymtech/nym
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GIT_BRANCH_NAME=feature/testing-support-files
|
|
||||||
GIT_BRANCH=feature/testing-support-files
|
|
||||||
GIT_COMMIT_MESSAGE=This is the commit message
|
|
||||||
GITHUB_ACTOR=octocat
|
|
||||||
|
|
||||||
# add a Personal Access Token (PAT) generated from GitHub here for use in testing
|
|
||||||
GITHUB_TOKEN=
|
|
||||||
|
|
||||||
#----------------------------------------------------------------
|
|
||||||
# Network Explorer
|
|
||||||
NYM_CI_WWW_LOCATION=some-branch
|
|
||||||
NYM_CI_WWW_BASE=example.com
|
|
||||||
|
|
||||||
#----------------------------------------------------------------
|
|
||||||
# Nightly builds
|
|
||||||
WORKFLOW_CONCLUSION=success
|
|
||||||
|
|
||||||
SHOW_DEBUG=true
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
node_modules
|
|
||||||
.idea
|
|
||||||
|
|
||||||
# don't commit the lock file to avoid cross-platform issues
|
|
||||||
package-lock.json
|
|
||||||
|
|
||||||
scratch
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
16
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
# GitHub Actions Support Files
|
|
||||||
|
|
||||||
This is a collection of scripts and files to support GitHub Actions.
|
|
||||||
|
|
||||||
## Sending Notifications
|
|
||||||
|
|
||||||
These scripts send CI notifications to Matrix by creating messages from templates and env vars passed from GitHub Actions.
|
|
||||||
|
|
||||||
### Adding notifications to a GitHub Action
|
|
||||||
|
|
||||||
```
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
...
|
|
||||||
- name: Notifications - Node Install
|
|
||||||
run: npm install
|
|
||||||
working-directory: .github/workflows/support-files/notifications
|
|
||||||
- name: Notifications - Send
|
|
||||||
env:
|
|
||||||
NYM_NOTIFICATION_KIND: "my-component"
|
|
||||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
|
||||||
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
|
||||||
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
|
||||||
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
|
||||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
|
||||||
uses: docker://keybaseio/client:stable-node
|
|
||||||
with:
|
|
||||||
args: .github/workflows/support-files/notifications/entry_point.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Notifications are run by adding the snippet above to a GitHub Action, and:
|
|
||||||
|
|
||||||
1. Installing node packages needed at run time
|
|
||||||
2. Set the env vars as required:
|
|
||||||
- `NYM_NOTIFICATION_KIND` matches the directory in `.github/workflows/support-files/${NYM_NOTIFICATION_KIND}` to provide the templates and extra scripting in `index.js`
|
|
||||||
- Matrix credentials, room and other env vars for the status of the build and repo
|
|
||||||
3. Replacing the default entry point shell script on the `keybaseio/client:stable-node` docker image to run `.github/workflows/support-files/notifications/entry_point.sh`
|
|
||||||
|
|
||||||
### Running locally
|
|
||||||
|
|
||||||
You will need:
|
|
||||||
- Node 16 LTS
|
|
||||||
- npm
|
|
||||||
|
|
||||||
Copy `.github/workflows/support-files/.env.example` to `.github/workflows/support-files/.env` and valid Matrix credentials.
|
|
||||||
|
|
||||||
Then run `npm install` to get dependencies.
|
|
||||||
|
|
||||||
Start development mode for the notification type you want either by passing the value as an env var called `NYM_NOTIFICATION_KIND` or set the `.env` file values correctly.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd .github/workflows/support-files
|
|
||||||
npm install
|
|
||||||
cp .env.example .env
|
|
||||||
vi .env
|
|
||||||
npm run dev
|
|
||||||
```
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
const Handlebars = require('handlebars');
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
async function addToContextAndValidate(context) {
|
|
||||||
if (!context.env.NYM_CI_WWW_LOCATION) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_LOCATION is set');
|
|
||||||
}
|
|
||||||
if (!context.env.NYM_CI_WWW_BASE) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_BASE is set');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getMessageBody(context) {
|
|
||||||
const source = fs
|
|
||||||
.readFileSync(
|
|
||||||
context.env.IS_SUCCESS === 'true'
|
|
||||||
? path.resolve(__dirname, 'templates', 'success')
|
|
||||||
: path.resolve(__dirname, 'templates', 'failure'),
|
|
||||||
)
|
|
||||||
.toString();
|
|
||||||
const template = Handlebars.compile(source);
|
|
||||||
return template(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
addToContextAndValidate,
|
|
||||||
getMessageBody,
|
|
||||||
};
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }}
|
|
||||||
>
|
|
||||||
> 🔴 **FAILURE** :cry:
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message:
|
|
||||||
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }} ➡️➡️➡️➡️➡️ **View output:** https://{{ env.NYM_CI_WWW_BASE }}/developers/
|
|
||||||
>
|
|
||||||
> ✅ **SUCCESS**
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
|
|
||||||
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
const Handlebars = require('handlebars');
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
async function addToContextAndValidate(context) {
|
|
||||||
if (!context.env.NYM_CI_WWW_LOCATION) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_LOCATION is set');
|
|
||||||
}
|
|
||||||
if (!context.env.NYM_CI_WWW_BASE) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_BASE is set');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getMessageBody(context) {
|
|
||||||
const source = fs
|
|
||||||
.readFileSync(
|
|
||||||
context.env.IS_SUCCESS === 'true'
|
|
||||||
? path.resolve(__dirname, 'templates', 'success')
|
|
||||||
: path.resolve(__dirname, 'templates', 'failure'),
|
|
||||||
)
|
|
||||||
.toString();
|
|
||||||
const template = Handlebars.compile(source);
|
|
||||||
return template(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
addToContextAndValidate,
|
|
||||||
getMessageBody,
|
|
||||||
};
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }} ➡️➡️➡️➡️➡️ **View output:** https://{{ env.NYM_CI_WWW_BASE }}/docs/
|
|
||||||
>
|
|
||||||
> ✅ **SUCCESS**
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
|
|
||||||
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
const Handlebars = require('handlebars');
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
async function addToContextAndValidate(context) {
|
|
||||||
if (!context.env.NYM_CI_WWW_LOCATION) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_LOCATION is set');
|
|
||||||
}
|
|
||||||
if (!context.env.NYM_CI_WWW_BASE) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_BASE is set');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getMessageBody(context) {
|
|
||||||
const source = fs
|
|
||||||
.readFileSync(
|
|
||||||
context.env.IS_SUCCESS === 'true'
|
|
||||||
? path.resolve(__dirname, 'templates', 'success')
|
|
||||||
: path.resolve(__dirname, 'templates', 'failure'),
|
|
||||||
)
|
|
||||||
.toString();
|
|
||||||
const template = Handlebars.compile(source);
|
|
||||||
return template(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
addToContextAndValidate,
|
|
||||||
getMessageBody,
|
|
||||||
};
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }}
|
|
||||||
>
|
|
||||||
> 🔴 **FAILURE** :cry:
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message:
|
|
||||||
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }} ➡️➡️➡️➡️➡️ **View output:** https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}/
|
|
||||||
>
|
|
||||||
> ✅ **SUCCESS**
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
|
|
||||||
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
const Handlebars = require('handlebars');
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
async function addToContextAndValidate(context) {
|
|
||||||
if (!context.env.NYM_CI_WWW_LOCATION) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_LOCATION is set');
|
|
||||||
}
|
|
||||||
if (!context.env.NYM_CI_WWW_BASE) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_BASE is set');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getMessageBody(context) {
|
|
||||||
const source = fs
|
|
||||||
.readFileSync(
|
|
||||||
context.env.IS_SUCCESS === 'true'
|
|
||||||
? path.resolve(__dirname, 'templates', 'success')
|
|
||||||
: path.resolve(__dirname, 'templates', 'failure'),
|
|
||||||
)
|
|
||||||
.toString();
|
|
||||||
const template = Handlebars.compile(source);
|
|
||||||
return template(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
addToContextAndValidate,
|
|
||||||
getMessageBody,
|
|
||||||
};
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }}
|
|
||||||
>
|
|
||||||
> 🔴 **FAILURE** :cry:
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message:
|
|
||||||
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }} ➡️➡️➡️➡️➡️ **View output:** https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}/
|
|
||||||
>
|
|
||||||
> ✅ **SUCCESS**
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
|
|
||||||
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
require('./notifications/send_message');
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
#
|
|
||||||
# Basic usage:
|
|
||||||
# ./git-merge-check origin/develop origin/release/v1.1.9
|
|
||||||
#
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
# Start from branch ...
|
|
||||||
branch1=$1
|
|
||||||
|
|
||||||
# ... and try to merge in
|
|
||||||
branch2=$2
|
|
||||||
|
|
||||||
echo "Checking if $branch2 merges without conflicts into $branch1..."
|
|
||||||
|
|
||||||
git checkout -q $branch1 || exit 1
|
|
||||||
|
|
||||||
# There are two options here as far as I see on what we should check for. Either
|
|
||||||
#
|
|
||||||
# (A) check for CONFLICT in any file except whitelist (such as .lock files)
|
|
||||||
# (B) check for "Automatic merge failed"
|
|
||||||
#
|
|
||||||
# Both of these options have drawbacks.
|
|
||||||
#
|
|
||||||
# The first (A) has the problem in that maybe we don't want to fail if the
|
|
||||||
# changes can be automatically merged (duh), but at least we are not pestered
|
|
||||||
# about constant lock file changes.
|
|
||||||
# The second (B) has the problem that it's difficult to filter out automatic
|
|
||||||
# merge fails for files we don't care about (.lock files).
|
|
||||||
#
|
|
||||||
# The ideal solution would be to check for automatic merge fails for files
|
|
||||||
# except those on a whitelist (e.g. lock files).
|
|
||||||
|
|
||||||
# For now I choose to use (B) here, because I hope it might be less noisy
|
|
||||||
|
|
||||||
# Alternative A
|
|
||||||
#output=$(git merge --no-commit --no-ff $branch2 | grep -v .lock)
|
|
||||||
#merge_failed=$(echo $output | grep -v "CONFLICT")
|
|
||||||
#return_code=$?
|
|
||||||
|
|
||||||
# Alternative B
|
|
||||||
output=$(git merge --no-commit --no-ff $branch2)
|
|
||||||
merge_failed=$(echo $output | grep -v "Automatic merge failed")
|
|
||||||
return_code=$?
|
|
||||||
|
|
||||||
# Restore
|
|
||||||
|
|
||||||
git merge --abort
|
|
||||||
git checkout -q -
|
|
||||||
|
|
||||||
if [ $return_code -eq 0 ]; then
|
|
||||||
echo "Merge check success"
|
|
||||||
else
|
|
||||||
echo "Merge check failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit $return_code
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
node_modules
|
||||||
|
.idea
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "send-keybase-message",
|
||||||
|
"description": "Sends a notification message with the keybase package that fails when piped into the keybase CLI",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"format": "prettier --write send_message.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"handlebars": "^4.7.7",
|
||||||
|
"keybase-bot": "^3.6.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"prettier": "2.3.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
const Bot = require('keybase-bot');
|
||||||
|
const Handlebars = require('handlebars');
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const data = { env: process.env };
|
||||||
|
// const data = { ...PASTE TEST DATA HERE ... }; // -- DEV: uncomment to set test data
|
||||||
|
|
||||||
|
// validation of environment
|
||||||
|
if(!(process.env.NYM_PROJECT_NAME || data.env.NYM_PROJECT_NAME)) {
|
||||||
|
throw new Error('Please set env var NYM_PROJECT_NAME with the project name for displaying in notification messages');
|
||||||
|
}
|
||||||
|
const keybaseChannel = process.env.KEYBASE_NYM_CHANNEL || data.env.KEYBASE_NYM_CHANNEL;
|
||||||
|
if(!keybaseChannel) {
|
||||||
|
throw new Error('Please set env var KEYBASE_NYM_CHANNEL with the channel name for the notification message');
|
||||||
|
}
|
||||||
|
|
||||||
|
// extract the git branch name
|
||||||
|
const GIT_BRANCH_NAME = (process.env.GITHUB_REF || data.env.GITHUB_REF).split('/').slice(2).join('/');
|
||||||
|
|
||||||
|
data.env.GIT_BRANCH_NAME = GIT_BRANCH_NAME;
|
||||||
|
const source = fs
|
||||||
|
.readFileSync(process.env.IS_SUCCESS === 'true' ? 'success' : 'failure')
|
||||||
|
.toString();
|
||||||
|
const template = Handlebars.compile(source);
|
||||||
|
const result = template(data);
|
||||||
|
|
||||||
|
// -- DEV: uncomment to show what is available in the handlebars template / show the result
|
||||||
|
// console.dir({ data }, { depth: null });
|
||||||
|
// console.log(result);
|
||||||
|
|
||||||
|
const bot = new Bot();
|
||||||
|
try {
|
||||||
|
const username = process.env.KEYBASE_NYMBOT_USERNAME;
|
||||||
|
const paperkey = process.env.KEYBASE_NYMBOT_PAPERKEY;
|
||||||
|
|
||||||
|
if(!username) {
|
||||||
|
throw new Error('Username is not defined. Please set env var KEYBASE_NYMBOT_USERNAME');
|
||||||
|
}
|
||||||
|
if(!paperkey) {
|
||||||
|
throw new Error('Paperkey is not defined. Please set env var KEYBASE_NYMBOT_PAPERKEY');
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`Initialising keybase with user "${username}" and key: "${'*'.repeat(paperkey.length)}"...`);
|
||||||
|
await bot.init(username, paperkey, { verbose: false });
|
||||||
|
|
||||||
|
const channel = {
|
||||||
|
name: 'nymtech_bot',
|
||||||
|
membersType: 'team',
|
||||||
|
topicName: keybaseChannel,
|
||||||
|
topic_type: 'CHAT',
|
||||||
|
};
|
||||||
|
const message = {
|
||||||
|
body: result,
|
||||||
|
};
|
||||||
|
|
||||||
|
console.log(`Sending to ${channel.name}#${channel.topicName}...`);
|
||||||
|
await bot.chat.send(channel, message);
|
||||||
|
|
||||||
|
console.log('Message sent!');
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
process.exitCode = -1;
|
||||||
|
} finally {
|
||||||
|
await bot.deinit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
|
||||||
|
> :rocket: {{ env.NYM_PROJECT_NAME }} ➡️➡️➡️➡️➡️ **View output:** https://{{ env.GITHUB_REF_SLUG }}.{{ env.NYM_CI_WWW_BASE }}/
|
||||||
|
> ✅ **SUCCESS**
|
||||||
|
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
||||||
|
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
||||||
|
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
||||||
|
|
||||||
|
Commit message:
|
||||||
|
```
|
||||||
|
{{ env.GIT_COMMIT_MESSAGE }}
|
||||||
|
```
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
const Handlebars = require('handlebars');
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
async function addToContextAndValidate(context) {
|
|
||||||
if (!context.env.NYM_CI_WWW_LOCATION) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_LOCATION is set');
|
|
||||||
}
|
|
||||||
if (!context.env.NYM_CI_WWW_BASE) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_BASE is set');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getMessageBody(context) {
|
|
||||||
const source = fs
|
|
||||||
.readFileSync(
|
|
||||||
context.env.IS_SUCCESS === 'true'
|
|
||||||
? path.resolve(__dirname, 'templates', 'success')
|
|
||||||
: path.resolve(__dirname, 'templates', 'failure'),
|
|
||||||
)
|
|
||||||
.toString();
|
|
||||||
const template = Handlebars.compile(source);
|
|
||||||
return template(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
addToContextAndValidate,
|
|
||||||
getMessageBody,
|
|
||||||
};
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }}
|
|
||||||
>
|
|
||||||
> 🔴 **FAILURE** :cry:
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message:
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }} ➡️➡️➡️➡️➡️ **View output:** https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}/
|
|
||||||
>
|
|
||||||
> `storybook`: https://{{ env.NYM_CI_WWW_LOCATION_STORYBOOK }}.{{ env.NYM_CI_WWW_BASE }}
|
|
||||||
>
|
|
||||||
> ✅ **SUCCESS**
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,162 +0,0 @@
|
|||||||
const Handlebars = require('handlebars');
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
const { Octokit, App } = require('octokit');
|
|
||||||
|
|
||||||
async function addToContextAndValidate(context) {
|
|
||||||
if (!context.env.WORKFLOW_CONCLUSION) {
|
|
||||||
throw new Error('Please ensure the env var WORKFLOW_CONCLUSION is set');
|
|
||||||
}
|
|
||||||
if (!context.env.GITHUB_TOKEN) {
|
|
||||||
throw new Error('Please ensure the env var GITHUB_TOKEN is set');
|
|
||||||
}
|
|
||||||
if (!context.env.GITHUB_RUN_ID) {
|
|
||||||
throw new Error('Please ensure the env var GITHUB_RUN_ID is set');
|
|
||||||
}
|
|
||||||
if (!context.env.GITHUB_REPOSITORY) {
|
|
||||||
throw new Error('Please ensure the env var GITHUB_REPOSITORY is set');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getMessageBody(context) {
|
|
||||||
const source = fs
|
|
||||||
.readFileSync(
|
|
||||||
context.env.WORKFLOW_CONCLUSION === 'success'
|
|
||||||
? path.resolve(__dirname, 'templates', 'success')
|
|
||||||
: path.resolve(__dirname, 'templates', 'failure'),
|
|
||||||
)
|
|
||||||
.toString();
|
|
||||||
const template = Handlebars.compile(source);
|
|
||||||
|
|
||||||
// get job details from GitHub API
|
|
||||||
const octokit = new Octokit({ auth: context.env.GITHUB_TOKEN });
|
|
||||||
const [owner, repo] = context.env.GITHUB_REPOSITORY.split('/');
|
|
||||||
const {
|
|
||||||
data: { jobs },
|
|
||||||
} = await octokit.rest.actions.listJobsForWorkflowRun({
|
|
||||||
run_id: context.env.GITHUB_RUN_ID,
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
});
|
|
||||||
|
|
||||||
// uncomment this to see what is available for each job
|
|
||||||
if(process.env.SHOW_DEBUG) {
|
|
||||||
console.dir(jobs, { depth: null });
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
a sample of the response is:
|
|
||||||
|
|
||||||
{
|
|
||||||
total_count: 10,
|
|
||||||
jobs: [
|
|
||||||
{
|
|
||||||
id: 5182940024,
|
|
||||||
run_id: 1840752095,
|
|
||||||
run_url: 'https://api.github.com/repos/nymtech/nym/actions/runs/1840752095',
|
|
||||||
run_attempt: 1,
|
|
||||||
node_id: 'CR_kwDODdjOis8AAAABNO1jeA',
|
|
||||||
head_sha: 'aa00eb70d57751bfa556bd3602df87c7473367fc',
|
|
||||||
url: 'https://api.github.com/repos/nymtech/nym/actions/jobs/5182940024',
|
|
||||||
html_url: 'https://github.com/nymtech/nym/runs/5182940024?check_suite_focus=true',
|
|
||||||
status: 'completed',
|
|
||||||
conclusion: 'success',
|
|
||||||
started_at: '2022-02-14T11:28:34Z',
|
|
||||||
completed_at: '2022-02-14T11:28:38Z',
|
|
||||||
name: 'matrix_prep',
|
|
||||||
steps: [
|
|
||||||
{
|
|
||||||
name: 'Set up job',
|
|
||||||
status: 'completed',
|
|
||||||
conclusion: 'success',
|
|
||||||
number: 1,
|
|
||||||
started_at: '2022-02-14T13:28:34.000+02:00',
|
|
||||||
completed_at: '2022-02-14T13:28:36.000+02:00'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Run actions/checkout@v2',
|
|
||||||
status: 'completed',
|
|
||||||
conclusion: 'success',
|
|
||||||
number: 2,
|
|
||||||
started_at: '2022-02-14T13:28:36.000+02:00',
|
|
||||||
completed_at: '2022-02-14T13:28:37.000+02:00'
|
|
||||||
},
|
|
||||||
...
|
|
||||||
],
|
|
||||||
check_run_url: 'https://api.github.com/repos/nymtech/nym/check-runs/5182940024',
|
|
||||||
labels: [ 'ubuntu-20.04' ],
|
|
||||||
runner_id: 1,
|
|
||||||
runner_name: 'Hosted Agent',
|
|
||||||
runner_group_id: 2,
|
|
||||||
runner_group_name: 'GitHub Actions'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 5182943473,
|
|
||||||
run_id: 1840752095,
|
|
||||||
run_url: 'https://api.github.com/repos/nymtech/nym/actions/runs/1840752095',
|
|
||||||
run_attempt: 1,
|
|
||||||
node_id: 'CR_kwDODdjOis8AAAABNO1w8Q',
|
|
||||||
head_sha: 'aa00eb70d57751bfa556bd3602df87c7473367fc',
|
|
||||||
url: 'https://api.github.com/repos/nymtech/nym/actions/jobs/5182943473',
|
|
||||||
html_url: 'https://github.com/nymtech/nym/runs/5182943473?check_suite_focus=true',
|
|
||||||
status: 'completed',
|
|
||||||
conclusion: 'failure',
|
|
||||||
started_at: '2022-02-14T11:29:04Z',
|
|
||||||
completed_at: '2022-02-14T11:55:45Z',
|
|
||||||
name: 'build (macos-latest, stable, schedule)',
|
|
||||||
steps: [
|
|
||||||
{
|
|
||||||
name: 'Set up job',
|
|
||||||
status: 'completed',
|
|
||||||
conclusion: 'success',
|
|
||||||
number: 1,
|
|
||||||
started_at: '2022-02-14T13:29:04.000+02:00',
|
|
||||||
completed_at: '2022-02-14T13:29:26.000+02:00'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Install Dependencies (Linux)',
|
|
||||||
status: 'completed',
|
|
||||||
conclusion: 'skipped',
|
|
||||||
number: 2,
|
|
||||||
started_at: '2022-02-14T13:29:26.000+02:00',
|
|
||||||
completed_at: '2022-02-14T13:29:26.000+02:00'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Keybase - Send Notification',
|
|
||||||
status: 'completed',
|
|
||||||
conclusion: 'failure',
|
|
||||||
number: 15,
|
|
||||||
started_at: '2022-02-14T13:55:44.000+02:00',
|
|
||||||
completed_at: '2022-02-14T13:55:44.000+02:00'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
check_run_url: 'https://api.github.com/repos/nymtech/nym/check-runs/5182943473',
|
|
||||||
labels: [ 'macos-latest' ],
|
|
||||||
runner_id: 4,
|
|
||||||
runner_name: 'GitHub Actions 4',
|
|
||||||
runner_group_id: 2,
|
|
||||||
runner_group_name: 'GitHub Actions'
|
|
||||||
},
|
|
||||||
...
|
|
||||||
]
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
const jobResults = jobs
|
|
||||||
.map((job) => {
|
|
||||||
const icon = job.conclusion === 'success' ? '🟩' : '🟥';
|
|
||||||
|
|
||||||
// each job is converted into formatted markdown text
|
|
||||||
return `${icon} ${job.conclusion}: ${job.name} - ${job.html_url}`;
|
|
||||||
})
|
|
||||||
// and join with newlines for display in the template
|
|
||||||
.join('\n\n');
|
|
||||||
|
|
||||||
return template({ ...context, jobResults });
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
addToContextAndValidate,
|
|
||||||
getMessageBody,
|
|
||||||
};
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }}
|
|
||||||
>
|
|
||||||
> 🔴 **FAILURE** :cry:
|
|
||||||
>
|
|
||||||
> `when` {{ timestamp }}
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
{{ jobResults }}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }}
|
|
||||||
>
|
|
||||||
> ✅ **SUCCESS**
|
|
||||||
>
|
|
||||||
> `when` {{ timestamp }}
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
{{ jobResults }}
|
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
require('dotenv').config();
|
|
||||||
|
|
||||||
const { sendMatrixMessage } = require('./send_message_to_matrix');
|
|
||||||
|
|
||||||
let context = {
|
|
||||||
kinds: ['nym-wallet', 'ts-packages', 'network-explorer', 'nightly', 'nym-connect','security','ci-docs','cd-docs','ci-dev','cd-dev'],
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Validate that all required env and context vars are available
|
|
||||||
*/
|
|
||||||
function validateContext() {
|
|
||||||
if (!context.env.NYM_NOTIFICATION_KIND) {
|
|
||||||
throw new Error(
|
|
||||||
'Please set env var NYM_NOTIFICATION_KIND with the project kind that matches a directory in ".github/workflows/support-files"',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!context.kinds.includes(context.env.NYM_NOTIFICATION_KIND)) {
|
|
||||||
throw new Error(`Env var NYM_NOTIFICATION_KIND is not in ${context.kinds}`);
|
|
||||||
}
|
|
||||||
if (!context.env.NYM_PROJECT_NAME) {
|
|
||||||
throw new Error(
|
|
||||||
'Please set env var NYM_PROJECT_NAME with the project name for displaying in notification messages',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (context.env.MATRIX_ROOM) {
|
|
||||||
if (!context.env.MATRIX_SERVER) {
|
|
||||||
throw new Error(
|
|
||||||
'Matrix server is not defined. Please set env var MATRIX_SERVER',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!context.env.MATRIX_USER_ID) {
|
|
||||||
throw new Error(
|
|
||||||
'Matrix user id is not defined. Please set env var MATRIX_USER_ID',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!context.env.MATRIX_TOKEN) {
|
|
||||||
throw new Error(
|
|
||||||
'Matrix token is not defined. Please set env var MATRIX_TOKEN',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!context.env.MATRIX_DEVICE_ID) {
|
|
||||||
throw new Error(
|
|
||||||
'Matrix device id is not defined. Please set env var MATRIX_DEVICE_ID',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a context that will be available in the templates for rendering notifications
|
|
||||||
*/
|
|
||||||
function createTemplateContext() {
|
|
||||||
const options = { dateStyle: 'full', timeStyle: 'long' };
|
|
||||||
context.timestamp = new Date().toLocaleString(undefined, options);
|
|
||||||
|
|
||||||
// add environment to template context and validate
|
|
||||||
context.env = process.env;
|
|
||||||
try {
|
|
||||||
validateContext();
|
|
||||||
} catch (e) {
|
|
||||||
if(process.env.SHOW_DEBUG) {
|
|
||||||
// recursively print the context for easy debugging and rethrow the error
|
|
||||||
console.dir({ context }, { depth: null });
|
|
||||||
}
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
|
|
||||||
context.kind = context.env.NYM_NOTIFICATION_KIND;
|
|
||||||
|
|
||||||
if (!context.env.GIT_BRANCH_NAME) {
|
|
||||||
context.env.GIT_BRANCH_NAME = context.env.GITHUB_REF.split('/')
|
|
||||||
.slice(2)
|
|
||||||
.join('/');
|
|
||||||
}
|
|
||||||
|
|
||||||
context.status = process.env.IS_SUCCESS === 'true' ? 'success' : 'failure';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Uses the `kind` set in the context to process the context and generate a notification message
|
|
||||||
* @returns {Promise<string>} A string notification message body
|
|
||||||
*/
|
|
||||||
async function processKindScript() {
|
|
||||||
const script = require(`../${context.kind}`);
|
|
||||||
if (!script.addToContextAndValidate) {
|
|
||||||
throw new Error(
|
|
||||||
`"./${context.kind}/index.js" does not export a method called "async addToContextAndValidate(context)"`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!script.getMessageBody) {
|
|
||||||
throw new Error(
|
|
||||||
`"./${context.kind}/index.js" does not export a method called "async getMessageBody(context)"`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// call the script to modify and validate the context
|
|
||||||
await script.addToContextAndValidate(context);
|
|
||||||
|
|
||||||
// let the script create a message body and return the result as a string for sending
|
|
||||||
return await script.getMessageBody(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The main function, as async so that await syntax is available
|
|
||||||
*/
|
|
||||||
async function main() {
|
|
||||||
createTemplateContext();
|
|
||||||
console.log(`Sending notification for kind "${context.kind}"...`);
|
|
||||||
const messageBody = await processKindScript();
|
|
||||||
if(process.env.SHOW_DEBUG) {
|
|
||||||
console.log('-----------------------------------------');
|
|
||||||
console.log(messageBody);
|
|
||||||
console.log('-----------------------------------------');
|
|
||||||
}
|
|
||||||
if(context.env.MATRIX_ROOM) {
|
|
||||||
await sendMatrixMessage(context, messageBody, context.env.MATRIX_ROOM)
|
|
||||||
}
|
|
||||||
if(context.env.MATRIX_ROOM_OF_SHAME && context.env.IS_SUCCESS !== 'true') {
|
|
||||||
// when a job fails
|
|
||||||
await sendMatrixMessage(context, messageBody, context.env.MATRIX_ROOM_OF_SHAME)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// call main function and let NodeJS handle the promise
|
|
||||||
main();
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
const sdk = require('matrix-js-sdk');
|
|
||||||
global.Olm = require('olm');
|
|
||||||
const { LocalStorage } = require('node-localstorage');
|
|
||||||
const localStorage = new LocalStorage('./scratch');
|
|
||||||
const {
|
|
||||||
LocalStorageCryptoStore,
|
|
||||||
} = require('matrix-js-sdk/lib/crypto/store/localStorage-crypto-store');
|
|
||||||
var showdown = require('showdown');
|
|
||||||
|
|
||||||
// hide all matrix client output
|
|
||||||
console.error = (error) => console.log('❌ error: ', error);
|
|
||||||
process.stderr.write = () => {};
|
|
||||||
process.stdout.write = () => {};
|
|
||||||
|
|
||||||
|
|
||||||
function createClient(context, room, message) {
|
|
||||||
const server = context.env.MATRIX_SERVER;
|
|
||||||
const token = context.env.MATRIX_TOKEN;
|
|
||||||
const deviceId = context.env.MATRIX_DEVICE_ID;
|
|
||||||
const userId = context.env.MATRIX_USER_ID;
|
|
||||||
|
|
||||||
const client = sdk.createClient({
|
|
||||||
baseUrl: server,
|
|
||||||
accessToken: token,
|
|
||||||
userId,
|
|
||||||
deviceId,
|
|
||||||
sessionStore: new sdk.WebStorageSessionStore(localStorage),
|
|
||||||
cryptoStore: new LocalStorageCryptoStore(localStorage),
|
|
||||||
});
|
|
||||||
|
|
||||||
client.on('sync', async function(state, prevState, res) {
|
|
||||||
if (state !== 'PREPARED') return;
|
|
||||||
client.setGlobalErrorOnUnknownDevices(false);
|
|
||||||
try {
|
|
||||||
await client.joinRoom(room);
|
|
||||||
await client.sendEvent(
|
|
||||||
room,
|
|
||||||
'm.room.message',
|
|
||||||
{
|
|
||||||
msgtype: 'm.text',
|
|
||||||
format: 'org.matrix.custom.html',
|
|
||||||
body: message,
|
|
||||||
formatted_body: message,
|
|
||||||
},
|
|
||||||
'',
|
|
||||||
);
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Job failed: ' + error.message);
|
|
||||||
}
|
|
||||||
client.stopClient();
|
|
||||||
process.exit(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
return client;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function sendMatrixMessage(contextArg, messageAsMarkdown, roomId) {
|
|
||||||
const converter = new showdown.Converter();
|
|
||||||
const messageAsHtml = converter.makeHtml(messageAsMarkdown);
|
|
||||||
const client = createClient(contextArg, roomId, messageAsHtml);
|
|
||||||
await client.initCrypto();
|
|
||||||
await client.startClient({ initialSyncLimit: 1 });
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
sendMatrixMessage,
|
|
||||||
};
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
const Handlebars = require('handlebars');
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
async function addToContextAndValidate(context) {
|
|
||||||
if (!context.env.NYM_CI_WWW_LOCATION) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_LOCATION is set');
|
|
||||||
}
|
|
||||||
if (!context.env.NYM_CI_WWW_BASE) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_BASE is set');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getMessageBody(context) {
|
|
||||||
const source = fs
|
|
||||||
.readFileSync(
|
|
||||||
context.env.IS_SUCCESS === 'true'
|
|
||||||
? path.resolve(__dirname, 'templates', 'success')
|
|
||||||
: path.resolve(__dirname, 'templates', 'failure'),
|
|
||||||
)
|
|
||||||
.toString();
|
|
||||||
const template = Handlebars.compile(source);
|
|
||||||
return template(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
addToContextAndValidate,
|
|
||||||
getMessageBody,
|
|
||||||
};
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }}
|
|
||||||
>
|
|
||||||
> 🔴 **FAILURE** :cry:
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message:
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }} ➡️➡️➡️➡️➡️ **View storybook:** https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}/
|
|
||||||
>
|
|
||||||
> ✅ **SUCCESS**
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
const Handlebars = require('handlebars');
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
async function addToContextAndValidate(context) {
|
|
||||||
if (!context.env.NYM_CI_WWW_LOCATION) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_LOCATION is set');
|
|
||||||
}
|
|
||||||
if (!context.env.NYM_CI_WWW_BASE) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_BASE is set');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getMessageBody(context) {
|
|
||||||
const source = fs
|
|
||||||
.readFileSync(
|
|
||||||
context.env.IS_SUCCESS === 'true'
|
|
||||||
? path.resolve(__dirname, 'templates', 'success')
|
|
||||||
: path.resolve(__dirname, 'templates', 'failure'),
|
|
||||||
)
|
|
||||||
.toString();
|
|
||||||
const template = Handlebars.compile(source);
|
|
||||||
return template(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
addToContextAndValidate,
|
|
||||||
getMessageBody,
|
|
||||||
};
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }}
|
|
||||||
>
|
|
||||||
> 🔴 **FAILURE** :cry:
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message:
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }}
|
|
||||||
>
|
|
||||||
> ✅ **SUCCESS**
|
|
||||||
>
|
|
||||||
> ➡️➡️➡️➡️➡️ **View output:**
|
|
||||||
>
|
|
||||||
> `storybook`: https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "send-matrix-message",
|
|
||||||
"description": "Sends a notification message with the matrix sdk",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
|
||||||
"dev": "node dev.js",
|
|
||||||
"format": "prettier --write **/*.js"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"dotenv": "^16.0.0",
|
|
||||||
"handlebars": "^4.7.7",
|
|
||||||
"matrix-js-sdk": "^9.3.0",
|
|
||||||
"node-localstorage": "^2.1.6",
|
|
||||||
"octokit": "^1.7.1",
|
|
||||||
"olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz",
|
|
||||||
"remark-emoji": "^2.2.0",
|
|
||||||
"remark-html": "^13.0.2",
|
|
||||||
"remark-parse": "^9.0.0",
|
|
||||||
"showdown": "^2.1.0",
|
|
||||||
"to-vfile": "^6.1.0",
|
|
||||||
"unified": "^9.2.2"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"prettier": "^2.8.7"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
const Handlebars = require('handlebars');
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
const { Octokit, App } = require('octokit');
|
|
||||||
|
|
||||||
async function addToContextAndValidate(context) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getMessageBody(context) {
|
|
||||||
try {
|
|
||||||
const source = fs
|
|
||||||
.readFileSync("deny.message").toString();
|
|
||||||
return source;
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
addToContextAndValidate,
|
|
||||||
getMessageBody,
|
|
||||||
};
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
const Handlebars = require('handlebars');
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
async function addToContextAndValidate(context) {
|
|
||||||
if (!context.env.NYM_CI_WWW_LOCATION) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_LOCATION is set');
|
|
||||||
}
|
|
||||||
if (!context.env.NYM_CI_WWW_BASE) {
|
|
||||||
throw new Error('Please ensure the env var NYM_CI_WWW_BASE is set');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getMessageBody(context) {
|
|
||||||
const source = fs
|
|
||||||
.readFileSync(
|
|
||||||
context.env.IS_SUCCESS === 'true'
|
|
||||||
? path.resolve(__dirname, 'templates', 'success')
|
|
||||||
: path.resolve(__dirname, 'templates', 'failure'),
|
|
||||||
)
|
|
||||||
.toString();
|
|
||||||
const template = Handlebars.compile(source);
|
|
||||||
return template(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
addToContextAndValidate,
|
|
||||||
getMessageBody,
|
|
||||||
};
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }}
|
|
||||||
>
|
|
||||||
> 🔴 **FAILURE** :cry:
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message:
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
|
|
||||||
> :rocket: {{ env.NYM_PROJECT_NAME }}
|
|
||||||
>
|
|
||||||
> ✅ **SUCCESS**
|
|
||||||
>
|
|
||||||
> ➡️➡️➡️➡️➡️ **View output:**
|
|
||||||
>
|
|
||||||
> `storybook`: https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}
|
|
||||||
>
|
|
||||||
> `example`: https://{{ env.NYM_CI_WWW_LOCATION }}-example.{{ env.NYM_CI_WWW_BASE }}
|
|
||||||
>
|
|
||||||
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
|
|
||||||
>
|
|
||||||
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
|
|
||||||
>
|
|
||||||
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
|
|
||||||
>
|
|
||||||
|
|
||||||
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
|
|
||||||
```
|
|
||||||
{{ env.GIT_COMMIT_MESSAGE }}
|
|
||||||
```
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
name: tag-and-release
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
nym_binaries_version:
|
|
||||||
description: 'Version of the nym-binaries tag'
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
nym_wallet_version:
|
|
||||||
description: 'Version of the nym-wallet tag'
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
nym_connect_version:
|
|
||||||
description: 'Version of the nym-connect tag'
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
tag-components:
|
|
||||||
uses: nymtech/reusable-workflows/.github/workflows/tag-components.yml@master
|
|
||||||
with:
|
|
||||||
nym_binaries_version: ${{ input.nym_binaries_version }}
|
|
||||||
nym_wallet_version: ${{ input.nym_wallet_version }}
|
|
||||||
nym_connect_version: ${{ input.nym_connect_version }}
|
|
||||||
|
|
||||||
create-nym-binaries-release:
|
|
||||||
if: ${{ input.nym_binaries_version }}
|
|
||||||
uses: nymtech/reusable-workflows/.github/workflows/create-binaries-release.yml@master
|
|
||||||
with:
|
|
||||||
version: ${{ input.nym_binaries_version }}
|
|
||||||
needs: ["tag-components"]
|
|
||||||
|
|
||||||
create-nym-wallet-release:
|
|
||||||
if: ${{ input.nym_wallet_version }}
|
|
||||||
uses: nymtech/reusable-workflows/.github/workflows/create-wallet-release.yml@master
|
|
||||||
with:
|
|
||||||
version: ${{ input.nym_wallet_version }}
|
|
||||||
needs: ["tag-components"]
|
|
||||||
|
|
||||||
create-nym-connect-release:
|
|
||||||
if: ${{ input.nym_connect_version }}
|
|
||||||
uses: nymtech/reusable-workflows/.github/workflows/create-connect-release.yml@master
|
|
||||||
with:
|
|
||||||
version: ${{ input.nym_connect_version }}
|
|
||||||
needs: ["tag-components"]
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
name: Generate TS types
|
||||||
|
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tauri-wallet-types:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Prepare
|
||||||
|
run: sudo apt-get update && sudo apt-get install -y libpango1.0-dev libatk1.0-dev libgdk-pixbuf2.0-dev libsoup2.4-dev librust-gdk-dev libwebkit2gtk-4.0-dev
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
- name: Generate TS
|
||||||
|
run: cd tauri-wallet/src-tauri && cargo test
|
||||||
|
- uses: EndBug/add-and-commit@v7.2.1 # https://github.com/marketplace/actions/add-commit
|
||||||
|
with:
|
||||||
|
add: '["tauri-wallet"]'
|
||||||
|
message: '[ci skip] Generate TS types'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
name: CI for linting Typescript
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'ts-packages/**'
|
|
||||||
- 'sdk/typescript/**'
|
|
||||||
- 'nym-connect/desktop/src/**'
|
|
||||||
- 'nym-connect/desktop/package.json'
|
|
||||||
- 'nym-connect/mobile/src/**'
|
|
||||||
- 'nym-connect/mobile/package.json'
|
|
||||||
- 'nym-wallet/src/**'
|
|
||||||
- 'nym-wallet/package.json'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'ts-packages/**'
|
|
||||||
- 'sdk/typescript/**'
|
|
||||||
- 'nym-connect/desktop/src/**'
|
|
||||||
- 'nym-connect/desktop/package.json'
|
|
||||||
- 'nym-connect/mobile/src/**'
|
|
||||||
- 'nym-connect/mobile/package.json'
|
|
||||||
- 'nym-wallet/src/**'
|
|
||||||
- 'nym-wallet/package.json'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: custom-runner-linux
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install rsync
|
|
||||||
run: sudo apt-get install rsync
|
|
||||||
continue-on-error: true
|
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
- name: Setup yarn
|
|
||||||
run: npm install -g yarn
|
|
||||||
- name: Install
|
|
||||||
run: yarn
|
|
||||||
- name: Build packages
|
|
||||||
run: yarn build
|
|
||||||
- name: Lint
|
|
||||||
run: yarn lint && yarn tsc
|
|
||||||
- name: Matrix - Node Install
|
|
||||||
run: npm install
|
|
||||||
working-directory: .github/workflows/support-files
|
|
||||||
- name: Matrix - Send Notification
|
|
||||||
env:
|
|
||||||
NYM_NOTIFICATION_KIND: ts-packages
|
|
||||||
NYM_PROJECT_NAME: "ts-packages"
|
|
||||||
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
|
||||||
NYM_CI_WWW_LOCATION: "ts-${{ env.GITHUB_REF_SLUG }}"
|
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
|
||||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
|
||||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
|
||||||
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
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
name: update-versions-and-changelog
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
release_version:
|
|
||||||
description: "Release version, usually the milestone title"
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
milestone_id:
|
|
||||||
description: "Milestone ID, check the URL when you're on the specific milestone page"
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
env:
|
|
||||||
CI_BOT_AUTHOR: "Nym bot"
|
|
||||||
CI_BOT_EMAIL: "nym-bot@users.noreply.github.com"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-versions:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: checkout-source
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: "release/${{ inputs.release_version }}"
|
|
||||||
path: "nym"
|
|
||||||
|
|
||||||
- name: checkout-ci-tools-repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
repository: "nymtech/ci-tools"
|
|
||||||
ref: "master"
|
|
||||||
path: "ci-tools"
|
|
||||||
token: "${{ secrets.ACCESS_TOKEN_PRIVATE_REPOS }}"
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
|
|
||||||
- name: install-version-bumper
|
|
||||||
run: "cargo install --path ."
|
|
||||||
working-directory: "ci-tools/version-bumper"
|
|
||||||
|
|
||||||
- name: run-version-bumper
|
|
||||||
run: "version-bumper bump binaries --nym-repo-directory nym"
|
|
||||||
|
|
||||||
- name: push-changes-to-branch
|
|
||||||
run: |
|
|
||||||
git config --global user.name "${{ env.CI_BOT_AUTHOR }}"
|
|
||||||
git config --global user.email "${{ env.CI_BOT_EMAIL }}"
|
|
||||||
git checkout -b release/${{ inputs.release_version }}-preparation
|
|
||||||
git commit -am "chore: version bump in preparation for release"
|
|
||||||
git push -u origin release/${{ inputs.release_version }}-preparation
|
|
||||||
working-directory: "nym"
|
|
||||||
|
|
||||||
update-changelog:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
needs: [update-versions]
|
|
||||||
steps:
|
|
||||||
- name: checkout-source
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: "release/${{ inputs.release_version }}"
|
|
||||||
path: "nym"
|
|
||||||
|
|
||||||
- name: checkout-ci-tools-repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
repository: "nymtech/ci-tools"
|
|
||||||
ref: "master"
|
|
||||||
path: "ci-tools"
|
|
||||||
token: "${{ secrets.ACCESS_TOKEN_PRIVATE_REPOS }}"
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
|
|
||||||
- name: install-changelog-updater
|
|
||||||
run: "cargo install --path ."
|
|
||||||
working-directory: "ci-tools/changelog-updater"
|
|
||||||
|
|
||||||
- name: run-changelog-updater
|
|
||||||
run: "changelog-updater mix ${{ inputs.milestone_id }} release/${{ inputs.release_version }}"
|
|
||||||
|
|
||||||
- name: push-changes-to-branch
|
|
||||||
run: |
|
|
||||||
git config --global user.name "${{ env.CI_BOT_AUTHOR }}"
|
|
||||||
git config --global user.email "${{ env.CI_BOT_EMAIL }}"
|
|
||||||
git checkout release/${{ inputs.release_version }}-preparation
|
|
||||||
git commit -am "chore: update changelog preparation for release"
|
|
||||||
git push
|
|
||||||
working-directory: "nym"
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
name: Nym Wallet (rust)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'nym-wallet/**'
|
|
||||||
- 'common/**'
|
|
||||||
- 'contracts/vesting/**'
|
|
||||||
- 'nym-api/nym-api-requests/**'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'nym-wallet/**'
|
|
||||||
- 'common/**'
|
|
||||||
- 'contracts/vesting/**'
|
|
||||||
- 'nym-api/nym-api-requests/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: [ self-hosted, custom-linux ]
|
|
||||||
env:
|
|
||||||
RUSTC_WRAPPER: /home/ubuntu/.cargo/bin/sccache
|
|
||||||
steps:
|
|
||||||
- name: Install Dependencies (Linux)
|
|
||||||
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Install rust toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
|
||||||
|
|
||||||
- name: Build all binaries
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace
|
|
||||||
|
|
||||||
- name: Run all tests
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace
|
|
||||||
|
|
||||||
- name: Check formatting
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --all -- --check
|
|
||||||
|
|
||||||
- uses: actions-rs/clippy-check@v1
|
|
||||||
name: Clippy checks
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace --all-features
|
|
||||||
|
|
||||||
- name: Run clippy
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --manifest-path nym-wallet/Cargo.toml --workspace --all-features --all-targets -- -D warnings
|
|
||||||
@@ -1,18 +1,10 @@
|
|||||||
name: Wasm Client
|
name: Wasm Client
|
||||||
|
|
||||||
on:
|
on: [push, pull_request]
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'clients/webassembly/**'
|
|
||||||
- 'clients/client-core/**'
|
|
||||||
- 'common/**'
|
|
||||||
- 'contracts/**'
|
|
||||||
- 'gateway/gateway-requests/**'
|
|
||||||
- 'nym-api/nym-api-requests/**'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
wasm:
|
wasm:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
@@ -31,10 +23,22 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: fmt
|
command: build
|
||||||
args: --manifest-path clients/webassembly/Cargo.toml -- --check
|
args: --manifest-path clients/webassembly/Cargo.toml --target wasm32-unknown-unknown --features=coconut
|
||||||
|
|
||||||
|
# for some reason this does not seem to work correctly, leave it for later, building is good enough for now
|
||||||
|
# - uses: actions-rs/cargo@v1
|
||||||
|
# with:
|
||||||
|
# command: test
|
||||||
|
# args: --manifest-path clients/webassembly/Cargo.toml --target wasm32-unknown-unknown
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: fmt
|
||||||
args: --manifest-path clients/webassembly/Cargo.toml --target wasm32-unknown-unknown -- -D warnings
|
args: --manifest-path clients/webassembly/Cargo.toml -- --check
|
||||||
|
|
||||||
|
# for some reason this does not seem to work correctly, leave it for later, building is good enough for now
|
||||||
|
# - uses: actions-rs/cargo@v1
|
||||||
|
# with:
|
||||||
|
# command: clippy
|
||||||
|
# args: --manifest-path clients/webassembly/Cargo.toml --target wasm32-unknown-unknown -- -D warnings
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
unreleased=true
|
|
||||||
future-release=v0.12.0
|
|
||||||
since-tag=v0.11.0
|
|
||||||
+1
-13
@@ -11,6 +11,7 @@ target
|
|||||||
/.vscode/settings.json
|
/.vscode/settings.json
|
||||||
validator/.vscode
|
validator/.vscode
|
||||||
sample-configs/validator-config.toml
|
sample-configs/validator-config.toml
|
||||||
|
.vscode
|
||||||
scripts/deploy_qa.sh
|
scripts/deploy_qa.sh
|
||||||
scripts/run_gate.sh
|
scripts/run_gate.sh
|
||||||
scripts/run_mix.sh
|
scripts/run_mix.sh
|
||||||
@@ -24,21 +25,8 @@ v6-topology.json
|
|||||||
/explorer/downloads/topology.json
|
/explorer/downloads/topology.json
|
||||||
/explorer/public/downloads/mixmining.json
|
/explorer/public/downloads/mixmining.json
|
||||||
/explorer/public/downloads/topology.json
|
/explorer/public/downloads/topology.json
|
||||||
/nym-wallet/dist/*
|
|
||||||
/clients/validator/examples/nym-driver-example/current-contract.txt
|
/clients/validator/examples/nym-driver-example/current-contract.txt
|
||||||
validator-api/v4.json
|
validator-api/v4.json
|
||||||
validator-api/v6.json
|
validator-api/v6.json
|
||||||
**/node_modules
|
**/node_modules
|
||||||
validator-api/keypair
|
validator-api/keypair
|
||||||
contracts/mixnet/code_id
|
|
||||||
contracts/mixnet/Justfile
|
|
||||||
contracts/mixnet/Makefile
|
|
||||||
validator-config
|
|
||||||
*.patch
|
|
||||||
validator-api-config.toml
|
|
||||||
dist
|
|
||||||
storybook-static
|
|
||||||
envs/qwerty.env
|
|
||||||
.parcel-cache
|
|
||||||
**/.DS_Store
|
|
||||||
cpu-cycles/libcpucycles/build
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
2.7.5
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"mainnet": [
|
|
||||||
{
|
|
||||||
"nyxd_url": "https://rpc.nyx.nodes.guru/",
|
|
||||||
"api_url": "https://api.nyx.nodes.guru/"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
+882
-818
File diff suppressed because it is too large
Load Diff
Generated
+3601
-3761
File diff suppressed because it is too large
Load Diff
+8
-75
@@ -9,43 +9,23 @@ overflow-checks = true
|
|||||||
[profile.dev]
|
[profile.dev]
|
||||||
panic = "abort"
|
panic = "abort"
|
||||||
|
|
||||||
[profile.test]
|
|
||||||
# equivalent of running in `--release` (but since we're in test profile we're keeping overflow checks and all of those by default)
|
|
||||||
opt-level = 3
|
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|
||||||
resolver = "2"
|
|
||||||
members = [
|
members = [
|
||||||
"clients/credential",
|
"clients/client-core",
|
||||||
"clients/native",
|
"clients/native",
|
||||||
"clients/native/websocket-requests",
|
"clients/native/websocket-requests",
|
||||||
"clients/socks5",
|
"clients/socks5",
|
||||||
"common/async-file-watcher",
|
"clients/tauri-client/src-tauri",
|
||||||
"common/bandwidth-controller",
|
"clients/webassembly",
|
||||||
"common/bin-common",
|
|
||||||
"common/client-core",
|
|
||||||
"common/client-libs/gateway-client",
|
"common/client-libs/gateway-client",
|
||||||
"common/client-libs/mixnet-client",
|
"common/client-libs/mixnet-client",
|
||||||
"common/client-libs/validator-client",
|
"common/client-libs/validator-client",
|
||||||
"common/coconut-interface",
|
"common/coconut-interface",
|
||||||
"common/commands",
|
|
||||||
"common/config",
|
"common/config",
|
||||||
"common/cosmwasm-smart-contracts/coconut-bandwidth-contract",
|
|
||||||
"common/cosmwasm-smart-contracts/coconut-dkg",
|
|
||||||
"common/cosmwasm-smart-contracts/contracts-common",
|
|
||||||
"common/cosmwasm-smart-contracts/group-contract",
|
|
||||||
"common/cosmwasm-smart-contracts/mixnet-contract",
|
|
||||||
"common/cosmwasm-smart-contracts/multisig-contract",
|
|
||||||
"common/cosmwasm-smart-contracts/service-provider-directory",
|
|
||||||
"common/cosmwasm-smart-contracts/vesting-contract",
|
|
||||||
"common/credential-storage",
|
|
||||||
"common/credentials",
|
"common/credentials",
|
||||||
"common/crypto",
|
"common/crypto",
|
||||||
"common/dkg",
|
"common/mixnet-contract",
|
||||||
"common/execute",
|
|
||||||
"common/inclusion-probability",
|
|
||||||
"common/ledger",
|
|
||||||
"common/mixnode-common",
|
"common/mixnode-common",
|
||||||
"common/network-defaults",
|
"common/network-defaults",
|
||||||
"common/nonexhaustive-delayqueue",
|
"common/nonexhaustive-delayqueue",
|
||||||
@@ -61,73 +41,26 @@ members = [
|
|||||||
"common/nymsphinx/params",
|
"common/nymsphinx/params",
|
||||||
"common/nymsphinx/types",
|
"common/nymsphinx/types",
|
||||||
"common/pemstore",
|
"common/pemstore",
|
||||||
"common/socks5-client-core",
|
|
||||||
"common/socks5/proxy-helpers",
|
"common/socks5/proxy-helpers",
|
||||||
"common/socks5/requests",
|
"common/socks5/requests",
|
||||||
"common/statistics",
|
|
||||||
"common/task",
|
|
||||||
"common/topology",
|
"common/topology",
|
||||||
"common/types",
|
|
||||||
"common/wasm-utils",
|
"common/wasm-utils",
|
||||||
"explorer-api",
|
"explorer-api",
|
||||||
"gateway",
|
"gateway",
|
||||||
"gateway/gateway-requests",
|
"gateway/gateway-requests",
|
||||||
"integrations/bity",
|
|
||||||
"mixnode",
|
"mixnode",
|
||||||
"sdk/rust/nym-sdk",
|
|
||||||
"service-providers/common",
|
|
||||||
"service-providers/network-requester",
|
"service-providers/network-requester",
|
||||||
"service-providers/network-statistics",
|
"validator-api",
|
||||||
"nym-api",
|
|
||||||
"nym-api/nym-api-requests",
|
|
||||||
"nym-outfox",
|
|
||||||
"tools/nym-cli",
|
|
||||||
"tools/ts-rs-cli"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
default-members = [
|
default-members = [
|
||||||
"clients/native",
|
"clients/native",
|
||||||
"clients/socks5",
|
"clients/socks5",
|
||||||
|
# "clients/webassembly",
|
||||||
"gateway",
|
"gateway",
|
||||||
"service-providers/network-requester",
|
"service-providers/network-requester",
|
||||||
"service-providers/network-statistics",
|
|
||||||
"mixnode",
|
"mixnode",
|
||||||
"nym-api",
|
"validator-api",
|
||||||
"explorer-api",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
exclude = ["explorer", "contracts", "clients/webassembly", "nym-wallet", "nym-connect/mobile/src-tauri", "nym-connect/desktop", "cpu-cycles"]
|
exclude = ["explorer", "contracts"]
|
||||||
|
|
||||||
[workspace.package]
|
|
||||||
authors = ["Nym Technologies SA"]
|
|
||||||
repository = "https://github.com/nymtech/nym"
|
|
||||||
homepage = "https://nymtech.net"
|
|
||||||
documentation = "https://nymtech.net"
|
|
||||||
edition = "2021"
|
|
||||||
license = "Apache-2.0"
|
|
||||||
|
|
||||||
[workspace.dependencies]
|
|
||||||
async-trait = "0.1.64"
|
|
||||||
bip39 = { version = "2.0.0", features = ["zeroize"] }
|
|
||||||
cfg-if = "1.0.0"
|
|
||||||
cosmwasm-derive = "=1.0.0"
|
|
||||||
cosmwasm-schema = "=1.0.0"
|
|
||||||
cosmwasm-std = "=1.0.0"
|
|
||||||
cosmwasm-storage = "=1.0.0"
|
|
||||||
cw-utils = "=0.13.4"
|
|
||||||
cw-storage-plus = "=0.13.4"
|
|
||||||
cw2 = { version = "=0.13.4" }
|
|
||||||
cw3 = { version = "=0.13.4" }
|
|
||||||
cw3-fixed-multisig = { version = "=0.13.4" }
|
|
||||||
cw4 = { version = "=0.13.4" }
|
|
||||||
dotenvy = "0.15.6"
|
|
||||||
lazy_static = "1.4.0"
|
|
||||||
log = "0.4"
|
|
||||||
once_cell = "1.7.2"
|
|
||||||
rand = "0.8.5"
|
|
||||||
serde = "1.0.152"
|
|
||||||
serde_json = "1.0.91"
|
|
||||||
tap = "1.0.1"
|
|
||||||
thiserror = "1.0.38"
|
|
||||||
tokio = "1.24.1"
|
|
||||||
url = "2.2"
|
|
||||||
|
|||||||
@@ -1,122 +0,0 @@
|
|||||||
# Default target
|
|
||||||
all: test
|
|
||||||
|
|
||||||
test: clippy-all cargo-test wasm fmt
|
|
||||||
|
|
||||||
test-all: test cargo-test-expensive
|
|
||||||
|
|
||||||
no-clippy: build cargo-test wasm fmt
|
|
||||||
|
|
||||||
happy: fmt clippy-happy test
|
|
||||||
|
|
||||||
# Building release binaries is a little manual as we can't just build --release
|
|
||||||
# on all workspaces.
|
|
||||||
build-release: build-release-main wasm
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Define targets for a given workspace
|
|
||||||
# $(1): name
|
|
||||||
# $(2): path to workspace
|
|
||||||
# $(3): extra arguments to cargo
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
define add_cargo_workspace
|
|
||||||
|
|
||||||
clippy-happy-$(1):
|
|
||||||
cargo clippy --manifest-path $(2)/Cargo.toml $(3)
|
|
||||||
|
|
||||||
clippy-$(1):
|
|
||||||
cargo clippy --manifest-path $(2)/Cargo.toml --workspace $(3) -- -D warnings
|
|
||||||
|
|
||||||
clippy-examples-$(1):
|
|
||||||
cargo clippy --manifest-path $(2)/Cargo.toml --workspace --examples -- -D warnings
|
|
||||||
|
|
||||||
check-$(1):
|
|
||||||
cargo check --manifest-path $(2)/Cargo.toml --workspace $(3)
|
|
||||||
|
|
||||||
test-$(1):
|
|
||||||
cargo test --manifest-path $(2)/Cargo.toml --workspace
|
|
||||||
|
|
||||||
test-expensive-$(1):
|
|
||||||
cargo test --manifest-path $(2)/Cargo.toml --workspace -- --ignored
|
|
||||||
|
|
||||||
build-$(1):
|
|
||||||
cargo build --manifest-path $(2)/Cargo.toml --workspace $(3)
|
|
||||||
|
|
||||||
build-examples-$(1):
|
|
||||||
cargo build --manifest-path $(2)/Cargo.toml --workspace --examples
|
|
||||||
|
|
||||||
build-release-$(1):
|
|
||||||
cargo build --manifest-path $(2)/Cargo.toml --workspace --release $(3)
|
|
||||||
|
|
||||||
fmt-$(1):
|
|
||||||
cargo fmt --manifest-path $(2)/Cargo.toml --all
|
|
||||||
|
|
||||||
clippy-happy: clippy-happy-$(1)
|
|
||||||
clippy-all: clippy-$(1) clippy-examples-$(1)
|
|
||||||
check: check-$(1)
|
|
||||||
cargo-test: test-$(1)
|
|
||||||
cargo-test-expensive: test-expensive-$(1)
|
|
||||||
build: build-$(1) build-$(1)-examples
|
|
||||||
build-release-all: build-release-$(1)
|
|
||||||
fmt: fmt-$(1)
|
|
||||||
|
|
||||||
endef
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Rust workspaces
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Generate targets for the various cargo workspaces
|
|
||||||
|
|
||||||
$(eval $(call add_cargo_workspace,main,.))
|
|
||||||
$(eval $(call add_cargo_workspace,contracts,contracts,--target wasm32-unknown-unknown))
|
|
||||||
$(eval $(call add_cargo_workspace,wasm-client,clients/webassembly,--target wasm32-unknown-unknown))
|
|
||||||
$(eval $(call add_cargo_workspace,wallet,nym-wallet,))
|
|
||||||
$(eval $(call add_cargo_workspace,connect,nym-connect/desktop))
|
|
||||||
ifdef NYM_MOBILE
|
|
||||||
$(eval $(call add_cargo_workspace,connect-mobile,nym-connect/mobile/src-tauri))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Convenience targets for crates that are already part of the main workspace
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
build-explorer-api:
|
|
||||||
cargo build -p explorer-api
|
|
||||||
|
|
||||||
build-nym-cli:
|
|
||||||
cargo build -p nym-cli --release
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Build contracts ready for deploy
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
CONTRACTS_OUT_DIR=contracts/target/wasm32-unknown-unknown/release
|
|
||||||
VESTING_CONTRACT=$(CONTRACTS_OUT_DIR)/vesting_contract.wasm
|
|
||||||
MIXNET_CONTRACT=$(CONTRACTS_OUT_DIR)/mixnet_contract.wasm
|
|
||||||
SERVICE_PROVIDER_DIRECTORY_CONTRACT=$(CONTRACTS_OUT_DIR)/nym_service_provider_directory.wasm
|
|
||||||
|
|
||||||
wasm: wasm-build wasm-opt
|
|
||||||
|
|
||||||
wasm-build:
|
|
||||||
RUSTFLAGS='-C link-arg=-s' cargo build --manifest-path contracts/Cargo.toml --release --target wasm32-unknown-unknown
|
|
||||||
|
|
||||||
wasm-opt:
|
|
||||||
wasm-opt --disable-sign-ext -Os $(VESTING_CONTRACT) -o $(VESTING_CONTRACT)
|
|
||||||
wasm-opt --disable-sign-ext -Os $(MIXNET_CONTRACT) -o $(MIXNET_CONTRACT)
|
|
||||||
wasm-opt --disable-sign-ext -Os $(SERVICE_PROVIDER_DIRECTORY_CONTRACT) -o $(SERVICE_PROVIDER_DIRECTORY_CONTRACT)
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Misc
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# NOTE: this seems deprecated an not needed anymore?
|
|
||||||
mixnet-opt: wasm
|
|
||||||
cd contracts/mixnet && make opt
|
|
||||||
|
|
||||||
generate-typescript:
|
|
||||||
cd tools/ts-rs-cli && cargo run && cd ../..
|
|
||||||
yarn types:lint:fix
|
|
||||||
|
|
||||||
run-api-tests:
|
|
||||||
cd nym-api/tests/functional_test && yarn test:qa
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user