aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/cache-factory.yaml120
-rw-r--r--.github/workflows/release.yaml174
-rw-r--r--.github/workflows/testing.yaml268
3 files changed, 281 insertions, 281 deletions
diff --git a/.github/workflows/cache-factory.yaml b/.github/workflows/cache-factory.yaml
index d2535ab..04fa3d1 100644
--- a/.github/workflows/cache-factory.yaml
+++ b/.github/workflows/cache-factory.yaml
@@ -4,74 +4,74 @@
name: Cache Factory
on:
- push:
- paths:
- - 'Cargo.lock'
- - './scripts/setup.sh'
- - './scripts/setup.ps1'
- - '.github/workflows/cache-factory.yaml'
- - '.github/actions/**/*.yml'
- - '.github/actions/**/*.yaml'
- - '**/build.rs'
- - 'core/prisma/**'
- branches:
- - main
+ push:
+ paths:
+ - Cargo.lock
+ - ./scripts/setup.sh
+ - ./scripts/setup.ps1
+ - .github/workflows/cache-factory.yaml
+ - '.github/actions/**/*.yml'
+ - '.github/actions/**/*.yaml'
+ - '**/build.rs'
+ - 'core/prisma/**'
+ branches:
+ - main
# Cancel previous runs of the same workflow on the same branch.
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
jobs:
- make_cache:
- strategy:
- fail-fast: true
- matrix:
- settings:
- - host: macos-latest
- target: x86_64-apple-darwin
- - host: macos-latest
- target: aarch64-apple-darwin
- - host: windows-latest
- target: x86_64-pc-windows-msvc
- - host: ubuntu-20.04
- target: x86_64-unknown-linux-gnu
- name: 'Make Cache'
- runs-on: ${{ matrix.settings.host }}
- steps:
- - name: Maximize build space
- if: ${{ runner.os == 'Linux' }}
- uses: easimon/maximize-build-space@master
- with:
- swap-size-mb: 3072
- root-reserve-mb: 6144
- remove-dotnet: 'true'
- remove-codeql: 'true'
- remove-haskell: 'true'
- remove-docker-images: 'true'
+ make_cache:
+ strategy:
+ fail-fast: true
+ matrix:
+ settings:
+ - host: macos-latest
+ target: x86_64-apple-darwin
+ - host: macos-latest
+ target: aarch64-apple-darwin
+ - host: windows-latest
+ target: x86_64-pc-windows-msvc
+ - host: ubuntu-20.04
+ target: x86_64-unknown-linux-gnu
+ name: Make Cache
+ runs-on: ${{ matrix.settings.host }}
+ steps:
+ - name: Maximize build space
+ if: ${{ runner.os == 'Linux' }}
+ uses: easimon/maximize-build-space@master
+ with:
+ swap-size-mb: 3072
+ root-reserve-mb: 6144
+ remove-dotnet: 'true'
+ remove-codeql: 'true'
+ remove-haskell: 'true'
+ remove-docker-images: 'true'
- - name: Checkout repository
- uses: actions/checkout@v3
+ - name: Checkout repository
+ uses: actions/checkout@v3
- - name: Symlink target to C:\
- if: ${{ runner.os == 'Windows' }}
- shell: powershell
- run: |
- New-Item -ItemType Directory -Force -Path C:\nexus_target
- New-Item -Path target -ItemType Junction -Value C:\nexus_target
+ - name: Symlink target to C:\
+ if: ${{ runner.os == 'Windows' }}
+ shell: powershell
+ run: |
+ New-Item -ItemType Directory -Force -Path C:\nexus_target
+ New-Item -Path target -ItemType Junction -Value C:\nexus_target
- - name: Setup System and Rust
- uses: ./.github/actions/setup-system
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- target: ${{ matrix.settings.target }}
- save-cache: 'true'
+ - name: Setup System and Rust
+ uses: ./.github/actions/setup-system
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ target: ${{ matrix.settings.target }}
+ save-cache: 'true'
- - name: Clippy
- run: cargo clippy --workspace --all-features --target ${{ matrix.settings.target }}
+ - name: Clippy
+ run: cargo clippy --workspace --all-features --target ${{ matrix.settings.target }}
- - name: Compile (debug)
- run: cargo test --workspace --all-features --no-run --target ${{ matrix.settings.target }}
+ - name: Compile (debug)
+ run: cargo test --workspace --all-features --no-run --target ${{ matrix.settings.target }}
- - name: Compile (release)
- run: cargo test --workspace --all-features --no-run --release --target ${{ matrix.settings.target }}
+ - name: Compile (release)
+ run: cargo test --workspace --all-features --no-run --release --target ${{ matrix.settings.target }}
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 4fbdbcd..5eac3bc 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -1,102 +1,102 @@
name: Release
on:
- workflow_dispatch:
+ workflow_dispatch:
# a lot of this isnt necessary but i'm designing ahead for tauri integration
jobs:
- desktop-main:
- strategy:
- matrix:
- settings:
- - host: macos-latest
- target: x86_64-apple-darwin
- bundles: app,dmg
- os: darwin
- arch: x86_64
- - host: macos-latest
- target: aarch64-apple-darwin
- bundles: app,dmg
- os: darwin
- arch: aarch64
- - host: windows-latest
- target: x86_64-pc-windows-msvc
- bundles: msi
- os: windows
- arch: x86_64
- - host: ubuntu-20.04
- target: x86_64-unknown-linux-gnu
- bundles: deb,appimage
- os: linux
- arch: x86_64
- name: Desktop - Main ${{ matrix.settings.target }}
- runs-on: ${{ matrix.settings.host }}
- steps:
- - name: Maximize build space
- if: ${{ runner.os == 'Linux' }}
- uses: easimon/maximize-build-space@master
- with:
- swap-size-mb: 3072
- root-reserve-mb: 6144
- remove-dotnet: 'true'
- remove-codeql: 'true'
- remove-haskell: 'true'
- remove-docker-images: 'true'
+ desktop-main:
+ strategy:
+ matrix:
+ settings:
+ - host: macos-latest
+ target: x86_64-apple-darwin
+ bundles: app,dmg
+ os: darwin
+ arch: x86_64
+ - host: macos-latest
+ target: aarch64-apple-darwin
+ bundles: app,dmg
+ os: darwin
+ arch: aarch64
+ - host: windows-latest
+ target: x86_64-pc-windows-msvc
+ bundles: msi
+ os: windows
+ arch: x86_64
+ - host: ubuntu-20.04
+ target: x86_64-unknown-linux-gnu
+ bundles: deb,appimage
+ os: linux
+ arch: x86_64
+ name: Desktop - Main ${{ matrix.settings.target }}
+ runs-on: ${{ matrix.settings.host }}
+ steps:
+ - name: Maximize build space
+ if: ${{ runner.os == 'Linux' }}
+ uses: easimon/maximize-build-space@master
+ with:
+ swap-size-mb: 3072
+ root-reserve-mb: 6144
+ remove-dotnet: 'true'
+ remove-codeql: 'true'
+ remove-haskell: 'true'
+ remove-docker-images: 'true'
- - name: Checkout repository
- uses: actions/checkout@v3
+ - name: Checkout repository
+ uses: actions/checkout@v3
- - name: Symlink target to C:\
- if: ${{ runner.os == 'Windows' }}
- shell: powershell
- run: |
- New-Item -ItemType Directory -Force -Path C:\nexus_target
- New-Item -Path target -ItemType Junction -Value C:\nexus_target
+ - name: Symlink target to C:\
+ if: ${{ runner.os == 'Windows' }}
+ shell: powershell
+ run: |
+ New-Item -ItemType Directory -Force -Path C:\nexus_target
+ New-Item -Path target -ItemType Junction -Value C:\nexus_target
- - name: Remove 32-bit libs
- if: ${{ runner.os == 'Linux' }}
- run: |
- dpkg -l | grep i386
- sudo apt-get purge --allow-remove-essential libc6-i386 ".*:i386"
- sudo dpkg --remove-architecture i386
+ - name: Remove 32-bit libs
+ if: ${{ runner.os == 'Linux' }}
+ run: |
+ dpkg -l | grep i386
+ sudo apt-get purge --allow-remove-essential libc6-i386 ".*:i386"
+ sudo dpkg --remove-architecture i386
- - name: Setup System and Rust
- uses: ./.github/actions/setup-system
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- target: ${{ matrix.settings.target }}
+ - name: Setup System and Rust
+ uses: ./.github/actions/setup-system
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ target: ${{ matrix.settings.target }}
- - name: Setup Node.js, pnpm and dependencies
- uses: ./.github/actions/setup-pnpm
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Setup Node.js, pnpm and dependencies
+ uses: ./.github/actions/setup-pnpm
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
- - name: Build
- run: |
- pnpm tauri build --ci -v --target ${{ matrix.settings.target }} --bundles ${{ matrix.settings.bundles }},updater
+ - name: Build
+ run: |
+ pnpm tauri build --ci -v --target ${{ matrix.settings.target }} --bundles ${{ matrix.settings.bundles }},updater
- # this doesnt work rn so just uhh dont use it lol
- - name: Publish Artifacts
- uses: ./.github/actions/publish-artifacts
- with:
- os: ${{ matrix.settings.os }}
- arch: ${{ matrix.settings.arch }}
- target: ${{ matrix.settings.target }}
- profile: release
+ # this doesnt work rn so just uhh dont use it lol
+ - name: Publish Artifacts
+ uses: ./.github/actions/publish-artifacts
+ with:
+ os: ${{ matrix.settings.os }}
+ arch: ${{ matrix.settings.arch }}
+ target: ${{ matrix.settings.target }}
+ profile: release
- release:
- if: startsWith(github.ref, 'refs/tags/')
- runs-on: ubuntu-latest
- name: Create Release
- needs: desktop-main
- permissions:
- contents: write
- steps:
- - name: Download artifacts
- uses: actions/download-artifact@v3
+ release:
+ if: startsWith(github.ref, 'refs/tags/')
+ runs-on: ubuntu-latest
+ name: Create Release
+ needs: desktop-main
+ permissions:
+ contents: write
+ steps:
+ - name: Download artifacts
+ uses: actions/download-artifact@v3
- - name: Create Release
- uses: softprops/action-gh-release@v1
- with:
- draft: true
- files: '*/**'
+ - name: Create Release
+ uses: softprops/action-gh-release@v1
+ with:
+ draft: true
+ files: '*/**'
diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml
index b92345c..6de44ee 100644
--- a/.github/workflows/testing.yaml
+++ b/.github/workflows/testing.yaml
@@ -1,142 +1,142 @@
name: CI
on:
- pull_request:
- merge_group:
+ # pull_request:
+ merge_group:
# Cancel previous runs of the same workflow on the same branch.
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
jobs:
- typescript:
- name: TypeScript
- runs-on: ubuntu-20.04
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
-
- - name: Setup Node.js, pnpm and dependencies
- uses: ./.github/actions/setup-pnpm
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Perform typechecks
- run: pnpm typecheck
-
- eslint:
- name: ESLint
- runs-on: ubuntu-20.04
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
-
- - name: Setup Node.js, pnpm and dependencies
- uses: ./.github/actions/setup-pnpm
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Perform linting
- run: pnpm lint
-
- rustfmt:
- name: Rust Formatting
- runs-on: ubuntu-20.04
- steps:
- - name: Maximize build space
- if: ${{ runner.os == 'Linux' }}
- uses: easimon/maximize-build-space@master
- with:
- swap-size-mb: 3072
- root-reserve-mb: 6144
- remove-dotnet: 'true'
- remove-codeql: 'true'
- remove-haskell: 'true'
- remove-docker-images: 'true'
-
- - name: Checkout repository
- uses: actions/checkout@v3
-
- - name: Symlink target to C:\
- if: ${{ runner.os == 'Windows' }}
- shell: powershell
- run: |
- New-Item -ItemType Directory -Force -Path C:\nexus_target
- New-Item -Path target -ItemType Junction -Value C:\nexus_target
-
- - uses: dorny/paths-filter@v2
- id: filter
- with:
- filters: |
- changes:
- - 'apps/cli/*/**'
- - 'apps/desktop/crates/*/**'
- - 'apps/desktop/src-tauri/*/**'
- - 'core/**'
- - 'crates/*/**'
- - 'Cargo.toml'
- - 'Cargo.lock'
-
- - name: Setup Rust
- if: steps.filter.outputs.changes == 'true'
- uses: ./.github/actions/setup-rust
-
- - name: Run rustfmt
- if: steps.filter.outputs.changes == 'true'
- run: cargo fmt --all -- --check
-
- clippy:
- name: Clippy (${{ matrix.platform }})
- runs-on: ${{ matrix.platform }}
- strategy:
- matrix:
- platform: [ubuntu-20.04, macos-latest, windows-latest]
- steps:
- - name: Maximize build space
- if: ${{ runner.os == 'Linux' }}
- uses: easimon/maximize-build-space@master
- with:
- swap-size-mb: 3072
- root-reserve-mb: 6144
- remove-dotnet: 'true'
- remove-codeql: 'true'
- remove-haskell: 'true'
- remove-docker-images: 'true'
-
- - name: Checkout repository
- uses: actions/checkout@v3
-
- - name: Symlink target to C:\
- if: ${{ runner.os == 'Windows' }}
- shell: powershell
- run: |
- New-Item -ItemType Directory -Force -Path C:\nexus_target
- New-Item -Path target -ItemType Junction -Value C:\nexus_target
-
- - uses: dorny/paths-filter@v2
- id: filter
- with:
- # this is also designing ahead for tauri
- filters: |
- changes:
- - 'apps/cli/*/**'
- - 'apps/desktop/crates/*/**'
- - 'apps/desktop/src-tauri/*/**'
- - 'core/**'
- - 'crates/*/**'
- - 'Cargo.toml'
- - 'Cargo.lock'
-
- - name: Setup System and Rust
- if: steps.filter.outputs.changes == 'true'
- uses: ./.github/actions/setup-system
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Run Clippy
- if: steps.filter.outputs.changes == 'true'
- uses: actions-rs/clippy-check@v1
- with:
- args: --workspace --all-features
- token: ${{ secrets.GITHUB_TOKEN }}
+ typescript:
+ name: TypeScript
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Setup Node.js, pnpm and dependencies
+ uses: ./.github/actions/setup-pnpm
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Perform builds
+ run: pnpm build
+
+ eslint:
+ name: ESLint
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Setup Node.js, pnpm and dependencies
+ uses: ./.github/actions/setup-pnpm
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Perform linting
+ run: pnpm lint
+
+ rustfmt:
+ name: Rust Formatting
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Maximize build space
+ if: ${{ runner.os == 'Linux' }}
+ uses: easimon/maximize-build-space@master
+ with:
+ swap-size-mb: 3072
+ root-reserve-mb: 6144
+ remove-dotnet: 'true'
+ remove-codeql: 'true'
+ remove-haskell: 'true'
+ remove-docker-images: 'true'
+
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Symlink target to C:\
+ if: ${{ runner.os == 'Windows' }}
+ shell: powershell
+ run: |
+ New-Item -ItemType Directory -Force -Path C:\nexus_target
+ New-Item -Path target -ItemType Junction -Value C:\nexus_target
+
+ - uses: dorny/paths-filter@v2
+ id: filter
+ with:
+ filters: |
+ changes:
+ - 'apps/cli/*/**'
+ - 'apps/desktop/crates/*/**'
+ - 'apps/desktop/src-tauri/*/**'
+ - 'core/**'
+ - 'crates/*/**'
+ - 'Cargo.toml'
+ - 'Cargo.lock'
+
+ - name: Setup Rust
+ if: steps.filter.outputs.changes == 'true'
+ uses: ./.github/actions/setup-rust
+
+ - name: Run rustfmt
+ if: steps.filter.outputs.changes == 'true'
+ run: cargo fmt --all -- --check
+
+ clippy:
+ name: Clippy (${{ matrix.platform }})
+ runs-on: ${{ matrix.platform }}
+ strategy:
+ matrix:
+ platform: [ubuntu-20.04, macos-latest, windows-latest]
+ steps:
+ - name: Maximize build space
+ if: ${{ runner.os == 'Linux' }}
+ uses: easimon/maximize-build-space@master
+ with:
+ swap-size-mb: 3072
+ root-reserve-mb: 6144
+ remove-dotnet: 'true'
+ remove-codeql: 'true'
+ remove-haskell: 'true'
+ remove-docker-images: 'true'
+
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Symlink target to C:\
+ if: ${{ runner.os == 'Windows' }}
+ shell: powershell
+ run: |
+ New-Item -ItemType Directory -Force -Path C:\nexus_target
+ New-Item -Path target -ItemType Junction -Value C:\nexus_target
+
+ - uses: dorny/paths-filter@v2
+ id: filter
+ with:
+ # this is also designing ahead for tauri
+ filters: |
+ changes:
+ - 'apps/cli/*/**'
+ - 'apps/desktop/crates/*/**'
+ - 'apps/desktop/src-tauri/*/**'
+ - 'core/**'
+ - 'crates/*/**'
+ - 'Cargo.toml'
+ - 'Cargo.lock'
+
+ - name: Setup System and Rust
+ if: steps.filter.outputs.changes == 'true'
+ uses: ./.github/actions/setup-system
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Run Clippy
+ if: steps.filter.outputs.changes == 'true'
+ uses: actions-rs/clippy-check@v1
+ with:
+ args: --workspace --all-features
+ token: ${{ secrets.GITHUB_TOKEN }}