Skip to content

Commit

Permalink
drl: only build on old macOS runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys-T committed Oct 30, 2024
1 parent 79bbe85 commit 98e367a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
-I $PWD
- name: Build nix packages
# run: nix shell -f '<nixpkgs>' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs
run: nix shell -f '.' nix-build-uncached-logging -c nix-build-uncached ci.nix ${{ matrix.qemuSystem && format('--argstr platform {0}', matrix.qemuSystem)}} -A cacheOutputs
run: nix shell -f '.' nix-build-uncached-logging -c nix-build-uncached ci.nix ${{ matrix.runner == 'macos-12' && '--arg includeDRL true' }} ${{ matrix.qemuSystem && format('--argstr platform {0}', matrix.qemuSystem) }} -A cacheOutputs
- name: Upload debug info
if: '!cancelled()'
uses: actions/upload-artifact@v4
Expand Down
3 changes: 2 additions & 1 deletion ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

{
platform ? null,
includeDRL ? false,
pkgs ? import <nixpkgs> (if platform != null then {
localSystem = platform;
packageOverrides = pkgs: {
Expand Down Expand Up @@ -52,7 +53,7 @@ let

outputsOf = p: map (o: p.${o}) p.outputs;

nurAttrs' = import ./default.nix { inherit pkgs; };
nurAttrs' = import ./default.nix { inherit pkgs includeDRL; };
nurAttrs = nurAttrs' // lib.optionalAttrs (nurAttrs'?_ciOnly) {
_ciOnly = lib.recurseIntoAttrs nurAttrs'._ciOnly;
};
Expand Down
37 changes: 11 additions & 26 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# commands such as:
# nix-build -A mypackage

{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> {}, includeDRL ? false }:

let result = pkgs.lib.makeScope pkgs.newScope (self: let
inherit (self) callPackage;
Expand Down Expand Up @@ -117,31 +117,16 @@ in {
};
});

drl-hq = callPackage ./pkgs/drl { drl-audio = self.drl-audio-hq; };
drl-lq = callPackage ./pkgs/drl { drl-audio = self.drl-audio-lq; };
drl = self.drl-hq;
drl-unwrapped = callPackage ./pkgs/drl/unwrapped.nix {};
drl-audio-hq = callPackage ./pkgs/drl/audio.nix { audioQuality = "hq"; };
drl-audio-lq = callPackage ./pkgs/drl/audio.nix { audioQuality = "lq"; };
drl-audio = self.drl-audio-hq;
_ciOnly.drl-dev = pkgs.lib.optionalAttrs (pkgs.hostPlatform.system == "x86_64-linux") (pkgs.lib.recurseIntoAttrs {
makewad = self.drl-unwrapped.overrideAttrs (old: {
pname = "drl-makewad-test";
buildPhase = ''
runHook preBuild
mkdir tmp
lua makefile.lua bin/makewad
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -D bin/makewad "$out"/bin/makewad
runHook postInstall
'';
meta = {};
});
}) // pkgs.lib.optionalAttrs (pkgs.hostPlatform.system == "x86_64-darwin") (pkgs.lib.recurseIntoAttrs {
env = self.drl-unwrapped.overrideAttrs (old: {
# drl-hq = callPackage ./pkgs/drl { drl-audio = self.drl-audio-hq; };
# drl-lq = callPackage ./pkgs/drl { drl-audio = self.drl-audio-lq; };
# drl = self.drl-hq;
# drl-unwrapped = callPackage ./pkgs/drl/unwrapped.nix {};
# drl-audio-hq = callPackage ./pkgs/drl/audio.nix { audioQuality = "hq"; };
# drl-audio-lq = callPackage ./pkgs/drl/audio.nix { audioQuality = "lq"; };
# drl-audio = self.drl-audio-hq;
_ciOnly.drl-dev = pkgs.lib.optionalAttrs (includeDRL && pkgs.hostPlatform.system == "x86_64-darwin") (pkgs.lib.recurseIntoAttrs rec {
drl-unwrapped = callPackage ./pkgs/drl/unwrapped.nix {};
env = /*self.*/drl-unwrapped.overrideAttrs (old: {
pname = "drl-env-test";
buildPhase = ''
runHook preBuild
Expand Down

0 comments on commit 98e367a

Please sign in to comment.