File tree Expand file tree Collapse file tree 15 files changed +142
-20
lines changed
Expand file tree Collapse file tree 15 files changed +142
-20
lines changed Original file line number Diff line number Diff line change 1+ set -a
2+ use flake
Original file line number Diff line number Diff line change 1+ name : main
2+ on :
3+ pull_request :
4+ concurrency :
5+ group : ${{ github.ref }}-${{ github.workflow }}
6+ jobs :
7+ build-linux :
8+ runs-on : ubuntu-22.04
9+ steps :
10+ - uses : actions/checkout@main
11+ - name : build tileconv
12+ run : |
13+ sudo apt-get update -yqqq
14+ sudo apt-get install -yqqq bison cmake flex wget libfl-dev
15+ mkdir -p obj
16+ make -j$(npoc) -C tileconv
17+ - uses : actions/upload-artifact@v4
18+ with :
19+ name : ubuntu-22.04
20+ path : tileconv/tileconv
21+ if-no-files-found : error
22+ build-nix :
23+ strategy :
24+ matrix :
25+ include :
26+ - os : macos-latest
27+ target : ' .#packages.aarch64-darwin'
28+ - os : macos-15-intel
29+ target : ' .#packages.x86_64-darwin'
30+ - os : ubuntu-24.04
31+ target : ' .#packages.x86_64-linux'
32+ - os : ubuntu-24.04-arm
33+ target : ' .#packages.aarch64-linux'
34+ runs-on : ${{ matrix.os }}
35+ steps :
36+ - uses : actions/checkout@main
37+ - uses : cachix/install-nix-action@master
38+ with :
39+ nix_path : nixpkgs=channel:nixos-25.11
40+ - run : |
41+ nix build ${{ matrix.target }}
Original file line number Diff line number Diff line change 2626/Debug
2727/Release
2828/.settings
29+
30+ .direnv
31+ .envrc
Original file line number Diff line number Diff line change 1+ {
2+ inputs = {
3+ nixpkgs . url = "github:NixOS/nixpkgs/nixos-unstable-small" ;
4+ } ;
5+ outputs = { self , nixpkgs } :
6+ let systems = [
7+ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"
8+ ] ;
9+ forAllSystems = f : nixpkgs . lib . genAttrs systems ( system : f system ) ;
10+ in {
11+ devShells = forAllSystems ( system :
12+ let
13+ pkgs = import nixpkgs { inherit system ; } ;
14+ in {
15+ default = pkgs . stdenv . mkDerivation {
16+ name = "tileconv" ;
17+ src = ./tileconv ;
18+ # Libs
19+ buildInputs = with pkgs ; [
20+ gnumake
21+ libjpeg8
22+ libsquish
23+ libimagequant
24+ zlib
25+ ] ;
26+ # Tools
27+ nativeBuildInputs = with pkgs ; [
28+ direnv
29+ git
30+ ] ;
31+ # Env
32+ shellHook = ''
33+ '' ;
34+ } ;
35+ } ) ;
36+ packages = forAllSystems ( system :
37+ let
38+ pkgs = import nixpkgs { inherit system ; } ;
39+ in pkgs . stdenv . mkDerivation {
40+ pname = "tileconv" ;
41+ src = ./tileconv ;
42+ nativeBuildInputs = with pkgs ; [
43+ gnumake
44+ libjpeg8
45+ libsquish
46+ libimagequant
47+ zlib
48+ ] ;
49+ buildInputs = with pkgs ; [
50+ git
51+ ] ;
52+ configurePhase = ''
53+ make -C tileconv
54+ '' ;
55+ buildPhase = ''
56+ make -j$(nproc) -C $out
57+ '' ;
58+ installPhase = ''
59+ ls $out
60+ '' ;
61+ enableParallelBuilding = true ;
62+ }
63+ ) ;
64+ } ;
65+ }
Original file line number Diff line number Diff line change @@ -78,5 +78,4 @@ $(EXECUTABLE): $(OBJECTS)
7878 $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) $< -o $@
7979
8080clean :
81- $(RM ) $(OBJECTS )
82- # $(RM) *.o
81+ $(RM ) -f * .o
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ THE SOFTWARE.
2222#ifndef _COLORQUANT_H_
2323#define _COLORQUANT_H_
2424
25- #include < lib/ libimagequant.h>
25+ #include < libimagequant.h>
2626
2727namespace tc {
2828
Original file line number Diff line number Diff line change 11# Where to install (Linux/Mac only)
22INSTALL_DIR ?= /usr/local
33
4- # Include paths of the external libraries
5- ZLIB_INCLUDE ?= ./zlib
6- SQUISH_INCLUDE ?= ./squish
7- PNGQUANT_INCLUDE ?= ./pngquant
8- JPEG_INCLUDE ?= ./jpeg-turbo
9-
10- # Paths to the libraries
11- ZLIB_LIB ?= ./zlib
12- SQUISH_LIB ?= ./squish
13- PNGQUANT_LIB ?= ./pngquant/lib
14- JPEG_LIB ?= ./jpeg-turbo
15-
164# Set to 1 when compiling on Windows using Win32 threads
175USE_WINTHREADS ?= 0
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments