Skip to content

Commit

Permalink
Try to include the binaries in the release
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Jun 29, 2024
1 parent 75615cf commit 7004e9b
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 52 deletions.
49 changes: 39 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,58 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup
- name: Restore cache
id: cache
uses: actions/cache@v3
with:
path: |
~/quicklisp/
~/.wine/
~/trial-deproyment/
key: ${{ runner.os }}
restore-keys: ${{ runner.os }}
- name: Install packages
run: |
git config --global user.name "CI"
git config --global user.email "[email protected]"
sudo apt-get -qq install sbcl curl fontforge imagemagick inkscape
sudo apt-get -qq install wine curl fontforge imagemagick inkscape --no-install-recommends
- name: Install env
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone --depth 1 https://gitea.tymoon.eu/Shirakumo/trial-deployment.git ~/trial-deployment
curl -o ~/quicklisp.lisp https://beta.quicklisp.org/quicklisp.lisp
sbcl --load ~/quicklisp.lisp \
~/trial-deployment/sbcl-lin \
--load ~/quicklisp.lisp \
--eval '(quicklisp-quickstart:install)' \
--eval '(ql-util:without-prompting (ql:add-to-init-file))' \
--eval '(ql:quickload :shasht)' \
--eval '(ql:quickload :clip)' \
--eval '(ql:quickload :pathname-utils)' \
--quit
~/trial-deployment/sbcl-win \
--load ~/quicklisp.lisp \
--eval '(quicklisp-quickstart:install)' \
--eval '(ql-util:without-prompting (ql:add-to-init-file))' \
--eval '(ql:quickload :shasht)' \
--eval '(ql:quickload :clip)' \
--eval '(ql:quickload :pathname-utils)' \
--quit
- uses: actions/cache@v3
with:
path: |
~/quicklisp/
key: ${{ runner.os }}
restore-keys: ${{ runner.os }}
- uses: actions/checkout@v2
- name: Rebuild
run: |
./compile.lisp all
~/trial-deployment/sbcl-lin \
--noinform \
--disable-debugger \
--eval "(ql:quickload '(clip shasht pathname-utils) :silent T)" \
--load "compile.lisp" \
--eval '(promptfont-compiler::dump)'
~/trial-deployment/sbcl-win \
--noinform \
--disable-debugger \
--eval "(ql:quickload '(clip shasht pathname-utils) :silent T)" \
--load "compile.lisp" \
--eval '(promptfont-compiler::dump)'
./promptfont.run all
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
Expand Down
14 changes: 1 addition & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
*.sfd-*
index.html
chars.txt
promptfont.css
promptfont.ttf
promptfont.otf
promptfont.afm
promptfont.txt
promptfont.h
promptfont.cs
promptfont.py
promptfont.lisp
promptfont.lua
promptfont.rs
promptfont.gd
promptfont-compiler.*
promptfont.*
*.png
*.zip
54 changes: 25 additions & 29 deletions compile.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ exec sbcl \
(real (princ-to-string arg)))))
(apply #'uiop:run-program
(list* program (loop for arg in program-args
append (if (listp arg)
(mapcar #'normalize arg)
(list (normalize arg)))))
append (typecase arg
(null ())
(list (mapcar #'normalize arg))
(T (list (normalize arg))))))
args))))

(defun outdated-p (out in)
Expand Down Expand Up @@ -290,6 +291,9 @@ for file in argv[2:]:
(file "promptfont" "lua")
(file "promptfont" "rs")
(file "promptfont" "gd")
(probe-file (file "promptfont" "run"))
(probe-file (file "promptfont" "exe"))
(probe-file (file "promptfont" "o"))
(directory (file :wild "png"))))

(defun query (&rest glyphs)
Expand Down Expand Up @@ -346,13 +350,6 @@ Tags: ~12t~{~a~^, ~}~%~%"
(dolist (command (or commands '(fixup fonts txt css h cs py lisp lua rs gd web atlas release)))
(run-command command)))

(defun dump ()
(sb-ext:save-lisp-and-die
(file "promptfont-compiler" #+win32 "exe" #+linux "run" #-(or win32 linux) "o")
:toplevel #'main
:executable T
:compression T))

(defun help ()
(format T "PromptFont data management utilities
by Yukari \"Shinmera\" Hafner
Expand All @@ -378,35 +375,34 @@ Compile Data:
--- Generates the glyph texture atlas files
Defaults to all banks and size of 64
txt --- Generates the promptfont.txt file
css --- Generates the promptfont.css file
h --- Generates the promptfont.h file
cs --- Generates the promptfont.cs file
py --- Generates the promptfont.py file
lisp --- Generates the promptfont.lisp file
lua --- Generates the promptfont.lua file
rs --- Generates the promptfont.rs file
gd --- Generates the promptfont.gd file
web --- Generates the index.html file
release --- Generates a release zip
txt --- Generate the respective glyph mapping source file
css
h
cs
py
lisp
lua
rs
gd
You typically do not need this utility as it is run automatically by
the GitHub CI when you create a PR.
https://shinmera.com/promptfont
" (uiop:argv0)))

(defun main ()
(destructuring-bind (argv0 &optional (command "all") &rest args) (uiop:raw-command-line-arguments)
(destructuring-bind (argv0 &optional (command "help") &rest args) (uiop:raw-command-line-arguments)
(declare (ignore argv0))
(apply #'run-command command args)))

(defun dump ()
(sb-ext:save-lisp-and-die
(file "promptfont" #+win32 "exe" #+linux "run" #-(or win32 linux) "o")
:toplevel #'main
:executable T
:compression 22))

0 comments on commit 7004e9b

Please sign in to comment.