2022-09-09 19:02:43 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Format:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
|
|
with:
|
|
|
|
extra_nix_config: |
|
|
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Check rustfmt
|
|
|
|
run: nix develop --command ci-check-rustfmt
|
|
|
|
|
|
|
|
Spelling:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
|
|
with:
|
|
|
|
extra_nix_config: |
|
|
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Check Spelling
|
|
|
|
run: nix develop --command ci-check-spelling
|
|
|
|
|
|
|
|
NixFormatting:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
|
|
with:
|
|
|
|
extra_nix_config: |
|
|
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Check nixpkgs-fmt formatting
|
|
|
|
run: nix develop --command ci-check-nixpkgs-fmt
|
|
|
|
|
|
|
|
EditorConfig:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
|
|
with:
|
|
|
|
extra_nix_config: |
|
|
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Check EditorConfig conformance
|
|
|
|
run: nix develop --command ci-check-editorconfig
|
|
|
|
|
|
|
|
Test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
|
|
with:
|
|
|
|
extra_nix_config: |
|
|
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run tests
|
|
|
|
run: nix develop --command ci-test-rust
|
|
|
|
# run: nix develop -c -- cargo test -- --include-ignored
|
|
|
|
|
|
|
|
BuildX86Linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
|
|
with:
|
|
|
|
extra_nix_config: |
|
|
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Runs clippy as part of the preBuild.
|
|
|
|
- name: Build harmonic
|
|
|
|
run: nix build .#packages.x86_64-linux.harmonic -L
|
|
|
|
- name: Build harmonicStatic
|
|
|
|
run: nix build .#packages.x86_64-linux.harmonicStatic -L
|
|
|
|
- name: Create artifact for x86_64-linux harmonicStatic
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: harmonic-x86_64-linux
|
|
|
|
path: |
|
|
|
|
result/bin/harmonic
|
|
|
|
|
2022-11-08 19:22:08 +00:00
|
|
|
RunX86Linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: BuildX86Linux
|
|
|
|
env:
|
|
|
|
RUST_LOG: harmonic=trace
|
|
|
|
RUST_BACKTRACE: full
|
|
|
|
steps:
|
|
|
|
- uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: harmonic-x86_64-linux
|
|
|
|
path: harmonic
|
|
|
|
- name: Set executable
|
|
|
|
run: chmod +x ./harmonic
|
|
|
|
- name: Initial install
|
|
|
|
run: ./harmonic install linux-multi --no-confirm
|
|
|
|
- name: Test run
|
|
|
|
run: nix run nixpkgs#fortune
|
|
|
|
- name: Initial uninstall
|
|
|
|
run: ./harmonic uninstall --no-confirm
|
|
|
|
- name: Repeated install
|
|
|
|
run: ./harmonic install linux-multi --no-confirm
|
|
|
|
- name: Repeated uninstall
|
|
|
|
run: ./harmonic uninstall --no-confirm
|
|
|
|
|
|
|
|
|
2022-09-09 19:02:43 +00:00
|
|
|
BuildX86Darwin:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
|
|
with:
|
|
|
|
extra_nix_config: |
|
|
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Runs clippy as part of the preBuild.
|
|
|
|
- name: Build harmonic
|
|
|
|
run: nix build .#packages.x86_64-darwin.harmonic -L
|
|
|
|
- name: Create artifact for x86_64-darwin harmonic
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: harmonic-x86_64-darwin
|
|
|
|
path: |
|
|
|
|
result/bin/harmonic
|
2022-11-08 19:22:08 +00:00
|
|
|
|
|
|
|
RunX86Darwin:
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: BuildX86Darwin
|
|
|
|
env:
|
|
|
|
RUST_LOG: harmonic=trace
|
|
|
|
RUST_BACKTRACE: full
|
|
|
|
steps:
|
|
|
|
- uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: harmonic-x86_64-darwin
|
|
|
|
path: harmonic
|
|
|
|
- name: Initial install
|
|
|
|
run: ./harmonic install darwin-multi --no-confirm
|
|
|
|
- name: Test run
|
|
|
|
run: nix run nixpkgs#fortune
|
|
|
|
- name: Initial uninstall
|
|
|
|
run: ./harmonic uninstall --no-confirm
|
|
|
|
- name: Repeated install
|
|
|
|
run: ./harmonic install darwin-multi --no-confirm
|
|
|
|
- name: Repeated uninstall
|
|
|
|
run: ./harmonic uninstall --no-confirm
|
|
|
|
|