Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,22 @@ on:
branches:
- main
jobs:
tests:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-shell CI.nix --command "cargo build"
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: nix-shell CI.nix --command "cargo build && cargo doc"

# uplood docs
- name: Upload to GitHub Pages (main branch only)
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: target/doc/freeswitch_rs/
- name: Deploy to GitHub Pages (main branch only)
if: github.ref == 'refs/heads/main'
uses: actions/deploy-pages@v4
5 changes: 2 additions & 3 deletions CI.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ let pkgs = import (builtins.fetchTarball https://github.com/NixOS/nixpkgs/archiv
rustPlatform = pkgs.makeRustPlatform { rustc = rustc; cargo = cargo;};
in
pkgs.mkShell {
inputsFrom = [ (pkgs.callPackage ./default.nix { inherit rustPlatform; }) ];
buildInputs = [
(import (builtins.fetchGit { url = "https://github.com/ash30/freeswitch"; ref = "nix"; rev = "2ecd26beeba14c0d66bda5ec471d68747e0b33b3";}) {})
(import (builtins.fetchGit { url = "https://github.com/ash30/freeswitch"; ref = "nix"; rev = "d805600c0f4843528290a0d018bb1fbb5b56808f";}) {})
pkgs.pkg-config
pkgs.rust-bin.stable.latest.rust-analyzer # LSP Server
pkgs.rust-bin.stable.latest.rustfmt # Formatter
pkgs.rust-bin.stable.latest.clippy # Linter
];
RUST_SRC_PATH = "${rustc}/lib/rustlib/src/rust/library/";
}