Skip to content

Commit

Permalink
feat(ci): add portable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
uulm-janbaudisch committed May 21, 2024
1 parent f2e90ad commit def7602
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Cache
uses: DeterminateSystems/magic-nix-cache-action@v4
- name: Build
run: nix build -L .#bundled
run: nix build -L .#all
- name: Upload
uses: actions/upload-artifact@v4
with:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/Portable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Portable

on:
- push

jobs:
Build:
strategy:
fail-fast: false
matrix:
target:
- triple: x86_64-unknown-linux-gnu
runner: ubuntu-latest
runs-on: ${{ matrix.target.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Nix
uses: DeterminateSystems/nix-installer-action@v10
- name: Cache
uses: DeterminateSystems/magic-nix-cache-action@v4
- name: Bundle
run: nix bundle --bundler github:DavHau/nix-portable -o bundle .#d4
- name: Documentation
run: cp doc/x86_64-linux-portable.md bundle/README.md
- name: Upload
uses: actions/upload-artifact@v4
with:
name: d4-${{ matrix.target.triple }}-bundled
path: bundle
16 changes: 8 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
};
};

bundled-deps = pkgs.buildEnv {
name = "bundled-deps";
dependencies = pkgs.buildEnv {
name = "dependencies";
paths = [
self.packages.${system}.mt-kahypar
pkgs.hwloc.lib
Expand All @@ -117,21 +117,21 @@
];
};

bundled-doc = pkgs.stdenv.mkDerivation {
name = "bundled-doc";
documentation = pkgs.stdenv.mkDerivation {
name = "documentation";
src = ./doc;
installPhase = ''
mkdir $out
cp ${system}.md $out/README.md
'';
};

bundled = pkgs.buildEnv {
name = "bundled";
all = pkgs.buildEnv {
name = "all";
paths = [
self.packages.${system}.d4
self.packages.${system}.bundled-deps
self.packages.${system}.bundled-doc
self.packages.${system}.dependencies
self.packages.${system}.doc
];
};
};
Expand Down

0 comments on commit def7602

Please sign in to comment.