Skip to content

Commit

Permalink
Merge commit '00600ddeeba4ed453c27bd7ea3b144d3d8560141' into simon/ec…
Browse files Browse the repository at this point in the history
…ash-dual
  • Loading branch information
simonwicky committed Dec 1, 2023
2 parents b41df9a + 00600dd commit f0fabb1
Show file tree
Hide file tree
Showing 614 changed files with 20,060 additions and 4,782 deletions.
29 changes: 2 additions & 27 deletions .github/workflows/cd-docs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: CD docs
name: cd-docs

on:
workflow_dispatch:
push:
branches: master
paths:
- 'documentation/docs/**'

Expand All @@ -26,7 +25,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --release --all
args: --workspace --release
- name: Install mdbook
run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4.33" mdbook)
- name: Install mdbook plugins
Expand All @@ -39,30 +38,6 @@ jobs:
run: cd documentation && ./build_all_to_dist.sh
continue-on-error: false

- 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: "dist/docs/"
REMOTE_HOST: ${{ secrets.CD_WWW_REMOTE_HOST_DEV }}
REMOTE_USER: ${{ secrets.CD_WWW_REMOTE_USER }}
TARGET: ${{ secrets.CD_WWW_REMOTE_TARGET }}/
EXCLUDE: "/node_modules/"

- name: Deploy branch master to prod
if: github.ref == 'refs/heads/master'
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.CD_WWW_SSH_PRIVATE_KEY }}
ARGS: "-rltgoDzvO --delete"
SOURCE: "dist/docs/"
REMOTE_HOST: ${{ secrets.CD_WWW_REMOTE_HOST_PROD }}
REMOTE_USER: ${{ secrets.CD_WWW_REMOTE_USER }}
TARGET: ${{ secrets.CD_WWW_REMOTE_TARGET }}/
EXCLUDE: "/node_modules/"

- name: Post process
run: cd documentation && ./post_process.sh
continue-on-error: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run config checks on all binaries
name: ci-binary-config-checker

on:
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-contracts-upload-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ jobs:
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: 1.69.0
toolchain: stable
target: wasm32-unknown-unknown
override: true

- name: Install wasm-opt
uses: ./.github/actions/install-wasm-opt
with:
version: '112'
version: '114'

- name: Build release contracts
run: make contracts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --release --all
args: --workspace --release
- name: Install mdbook
run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4.35" mdbook)
- name: Install mdbook plugins
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-nym-api-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI for Nym API Tests
name: ci-nym-api-tests

on:
workflow_dispatch:
Expand All @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install npm
run: npm install

- name: Node v18
uses: actions/setup-node@v3
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci-nym-connect-desktop-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
override: true
components: rustfmt, clippy

- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path nym-connect/desktop/Cargo.toml --all -- --check

- name: Build all binaries
uses: actions-rs/cargo@v1
with:
Expand All @@ -45,12 +51,6 @@ jobs:
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
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/ci-nym-vpn-ui-js.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: ci-nym-vpn-ui-js

on:
push:
paths:
- 'nym-vpn/ui/src/**'
- 'nym-vpn/ui/package.json'
- 'nym-vpn/ui/index.html'
workflow_dispatch:
pull_request:
paths:
- 'nym-vpn/ui/src/**'
Expand All @@ -14,7 +10,7 @@ on:

jobs:
check:
runs-on: [ self-hosted, custom-linux ]
runs-on: custom-linux
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/ci-nym-vpn-ui-rust.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: ci-nym-vpn-ui-rust

on:
push:
paths:
- 'nym-vpn/ui/src-tauri/**'
workflow_dispatch:
pull_request:
paths:
- 'nym-vpn/ui/src-tauri/**'

jobs:
build:
runs-on: [self-hosted, custom-linux]
runs-on: custom-linux
env:
CARGO_TERM_COLOR: always
CARGOTOML_PATH: ./nym-vpn/ui/src-tauri/Cargo.toml
Expand All @@ -31,34 +29,35 @@ jobs:
components: rustfmt, clippy

- name: Prepare build
working-directory: nym-vpn/ui/
run: mkdir dist
run: mkdir nym-vpn/ui/dist

- name: Check build
working-directory: nym-vpn/ui/src-tauri
run: cargo build --release --lib --features custom-protocol
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path ${{ env.CARGOTOML_PATH }} --features custom-protocol

# - name: Run all tests
# uses: actions-rs/cargo@v1
# with:
# command: test
# args: --manifest-path ${{ env.CARGOTOML_PATH }} --workspace
# args: --manifest-path ${{ env.CARGOTOML_PATH }}

- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path ${{ env.CARGOTOML_PATH }} --all -- --check

- uses: actions-rs/clippy-check@v1
name: Clippy checks
- name: Annotate with clippy checks
uses: actions-rs/clippy-check@v1
continue-on-error: true
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --manifest-path ${{ env.CARGOTOML_PATH }} --workspace --all-features
args: --manifest-path ${{ env.CARGOTOML_PATH }} --all-features

- name: Run clippy
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path ${{ env.CARGOTOML_PATH }} --workspace --all-features -- -D warnings
args: --manifest-path ${{ env.CARGOTOML_PATH }} --all-features --all-targets -- -D warnings
43 changes: 43 additions & 0 deletions .github/workflows/deploy-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["feature/ppa-repo"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: './ppa'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
41 changes: 33 additions & 8 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ on:
workflow_dispatch:
schedule:
- cron: '14 1 * * *'

jobs:
build:
strategy:
fail-fast: false
matrix:
rust: [stable, beta]
os: [custom-linux, windows10, custom-runner-mac-m1]
os: [ubuntu-20.04, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
CARGO_TERM_COLOR: always
continue-on-error: true
steps:
- name: Install Dependencies (Linux)
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler
continue-on-error: true
if: matrix.os == 'custom-linux'

- name: Check out repository code
uses: actions/checkout@v3

- name: Install Dependencies (Linux)
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler
if: matrix.os == 'ubuntu-20.04'

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -32,6 +32,12 @@ jobs:
override: true
components: rustfmt, clippy

- name: Install Protoc
uses: arduino/setup-protoc@v2
if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest'
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Check formatting
uses: actions-rs/cargo@v1
with:
Expand All @@ -42,13 +48,27 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace
args: --release --workspace

- name: Build examples
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --examples
args: --release --workspace --examples

# To avoid running out of disk space, skip generating debug symbols
- name: Set debug to false (unix)
if: matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-latest'
run: |
sed -i.bak 's/\[profile.dev\]/\[profile.dev\]\ndebug = false/' Cargo.toml
git diff
- name: Set debug to false (win)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
(Get-Content Cargo.toml) -replace '\[profile.dev\]', "`$&`ndebug = false" | Set-Content Cargo.toml
git diff
- name: Run unit tests
uses: actions-rs/cargo@v1
Expand All @@ -62,6 +82,11 @@ jobs:
command: test
args: --workspace -- --ignored

- name: Clean
uses: actions-rs/cargo@v1
with:
command: clean

- name: Clippy
uses: actions-rs/cargo@v1
with:
Expand Down
Loading

0 comments on commit f0fabb1

Please sign in to comment.