Skip to content

Commit

Permalink
cli: Package with nix (#80)
Browse files Browse the repository at this point in the history
* cli: Package with nix

* Fix web build
  • Loading branch information
antangelo authored Aug 25, 2024
1 parent eea0fa4 commit 33d6604
Show file tree
Hide file tree
Showing 9 changed files with 5,733 additions and 47 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
on:
push:
branches:
- main
tags:
- v*
pull_request:
name: Check

jobs:
check:
name: Check and lint
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Check build
uses: actions-rs/cargo@v1
with:
command: check
args: --all

- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Check lints
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all -- -D warnings

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test

- name: Run test suite
run: cd tests && python3 test.py
46 changes: 0 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,6 @@ on:
name: Build

jobs:
check:
name: Check and lint
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Check build
uses: actions-rs/cargo@v1
with:
command: check
args: --all

- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Check lints
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all -- -D warnings

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test

- name: Run test suite
run: cd tests && python3 test.py

build_lib:
name: Build (xdvdfs)
runs-on: ubuntu-latest
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
push:
branches:
- main
tags:
- v*
pull_request:
name: Nix

jobs:
build:
strategy:
matrix:
platform: [macos-latest, ubuntu-latest]
name: Build Nix Flake
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Build
run: nix build
- name: Check
run: nix flake check
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/target
/Cargo.lock
*.iso
*.xiso
*.cso
*.ciso
**/dist/**
**/*.log
tests/**/__pycache__
result
Loading

0 comments on commit 33d6604

Please sign in to comment.