Skip to content
Open
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
60 changes: 60 additions & 0 deletions .github/workflows/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
description = "Shipwright development environment";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
# Build tools
clang
git
cmake
ninja
lsb-release
pkg-config

# SDL2 libraries
SDL2
SDL2.dev
SDL2_net

# Other libraries
libpng
libzip
nlohmann_json
tinyxml-2
spdlog
libGL
libGL.dev
bzip2

# X11 libraries
xorg.libX11

# Audio libraries
libogg
libogg.dev
libvorbis
libvorbis.dev
libopus
libopus.dev
opusfile
opusfile.dev
];

shellHook = ''
echo "Shipwright development environment loaded"
echo "Available tools: clang, git, cmake, ninja"
'';
};
});
}
8 changes: 6 additions & 2 deletions .github/workflows/test-builds-on-distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
build:
strategy:
matrix:
image: ["archlinux:base", "opensuse/tumbleweed:latest", "ubuntu:mantic", "debian:bookworm", "fedora:39"]
cc: ["gcc", "clang"]
image: ["archlinux:base", "opensuse/tumbleweed:latest", "ubuntu:mantic", "debian:bookworm", "fedora:39", "nixos/nix:latest"]
cc: ["gcc", "clang"]
include:
- cxx: g++
cc: gcc
Expand Down Expand Up @@ -48,6 +48,10 @@ jobs:
echo zypper in ${{ matrix.cc }} ${{ (matrix.cxx == 'g++' && 'gcc-c++') || '' }} ${{ matrix.cc == 'clang' && 'libstdc++-devel' || '' }} git cmake ninja SDL2-devel libpng16-devel libzip-devel libzip-tools nlohmann_json-devel tinyxml2-devel spdlog-devel
zypper --non-interactive dup
zypper --non-interactive in ${{ matrix.cc }} ${{ (matrix.cxx == 'g++' && 'gcc-c++') || '' }} ${{ matrix.cc == 'clang' && 'libstdc++-devel' || '' }} git cmake ninja SDL2-devel libpng16-devel libzip-devel libzip-tools nlohmann_json-devel tinyxml2-devel spdlog-devel
- name: Install dependencies (Nix)
if: ${{ matrix.image == 'nix/nixos:latest' }}
run: |
nix develop .github/workflows/flake.nix
- name: Install latest nlohmann
if: ${{ matrix.image == 'fedora:39' }}
run: |
Expand Down
Loading