nix: keep symbols if we're building a debug package
also add CI tests to make sure debug symbols exist Co-authored-by: Mitchell Hashimoto <m@mitchellh.com>pull/7395/head
parent
dd5d2c5d0b
commit
9ad0e4675b
|
|
@ -211,8 +211,23 @@ jobs:
|
||||||
name: ghostty
|
name: ghostty
|
||||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||||
|
|
||||||
- name: Test NixOS package build
|
- name: Test release NixOS package build
|
||||||
run: nix build .#ghostty
|
run: nix build .#ghostty-releasefast
|
||||||
|
|
||||||
|
- name: Check version
|
||||||
|
run: result/bin/ghostty +version | grep -q 'builtin.OptimizeMode.ReleaseFast'
|
||||||
|
|
||||||
|
- name: Check to see if the binary has been stripped
|
||||||
|
run: nm result/bin/.ghostty-wrapped 2>&1 | grep -q 'no symbols'
|
||||||
|
|
||||||
|
- name: Test debug NixOS package build
|
||||||
|
run: nix build .#ghostty-debug
|
||||||
|
|
||||||
|
- name: Check version
|
||||||
|
run: result/bin/ghostty +version | grep -q 'builtin.OptimizeMode.Debug'
|
||||||
|
|
||||||
|
- name: Check to see if the binary has not been stripped
|
||||||
|
run: nm result/bin/.ghostty-wrapped 2>&1 | grep -q 'main_ghostty.main'
|
||||||
|
|
||||||
build-dist:
|
build-dist:
|
||||||
runs-on: namespace-profile-ghostty-md
|
runs-on: namespace-profile-ghostty-md
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
buildInputs = import ./build-support/build-inputs.nix {
|
buildInputs = import ./build-support/build-inputs.nix {
|
||||||
inherit pkgs lib stdenv enableX11 enableWayland;
|
inherit pkgs lib stdenv enableX11 enableWayland;
|
||||||
};
|
};
|
||||||
|
strip = optimize != "Debug" && optimize != "ReleaseSafe";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "ghostty";
|
pname = "ghostty";
|
||||||
|
|
@ -87,6 +88,7 @@ in
|
||||||
buildInputs = buildInputs;
|
buildInputs = buildInputs;
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
dontStrip = !strip;
|
||||||
|
|
||||||
GI_TYPELIB_PATH = gi_typelib_path;
|
GI_TYPELIB_PATH = gi_typelib_path;
|
||||||
|
|
||||||
|
|
@ -96,6 +98,7 @@ in
|
||||||
"-Dversion-string=${finalAttrs.version}-${revision}-nix"
|
"-Dversion-string=${finalAttrs.version}-${revision}-nix"
|
||||||
"-Dgtk-x11=${lib.boolToString enableX11}"
|
"-Dgtk-x11=${lib.boolToString enableX11}"
|
||||||
"-Dgtk-wayland=${lib.boolToString enableWayland}"
|
"-Dgtk-wayland=${lib.boolToString enableWayland}"
|
||||||
|
"-Dstrip=${lib.boolToString strip}"
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue