-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
108 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: CD for Mogan Research on Debian bookworm | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
XMAKE_ROOT: y | ||
QT_QPA_PLATFORM: offscreen | ||
INSTALL_DIR: tmp/build/packages/app.mogan/ | ||
|
||
jobs: | ||
build: | ||
container: fedora:41 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
sudo dnf update -y | ||
sudo dnf install -y git xmake unzip gcc g++ curl-devel libgit2-devel fontconfig-devel \ | ||
qt6-qtbase-devel qt6-qtsvg-devel mimalloc-devel libpng-devel | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: set XMAKE_GLOBALDIR | ||
run: echo "XMAKE_GLOBALDIR=/tmp/xmake-global" >> $GITHUB_ENV | ||
|
||
- name: Xrepo update | ||
run: xmake repo --update | ||
|
||
- name: Generate Installer | ||
run: | | ||
QA_RPATHS=0x0001 xmake pack -vD -f rpm research | ||
cp build/xpack/research/x86_64/*rpm mogan-research-v1.2.9.7-rc3-fedora41.rpm | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | ||
with: | ||
path: mogan-*.rpm | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
prerelease: true | ||
files: mogan-*.rpm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -276,6 +276,66 @@ end | |
-- Mogan Research | ||
includes("xmake/research.lua") | ||
|
||
if is_mode("release") then | ||
xpack("research") do | ||
set_formats("nsis", "zip", "rpm", "srpm") | ||
set_author("Darcy Shen <[email protected]>") | ||
set_license("GPLv3") | ||
set_licensefile(path.join(os.projectdir(), "LICENSE")) | ||
set_title("Mogan Research") | ||
set_description("user friendly distribution of GNU TeXmacs") | ||
set_homepage("https://mogan.app") | ||
|
||
_, pos = string.find(XMACS_VERSION, "-") | ||
local XMACS_VERSION_XYZ= XMACS_VERSION | ||
if not (pos == nil) then | ||
XMACS_VERSION_XYZ= string.sub(XMACS_VERSION, 1, pos-1) | ||
end | ||
set_version(XMACS_VERSION_XYZ) | ||
|
||
if is_plat ("windows") then | ||
set_specfile(path.join(os.projectdir(), "packages/windows/research.nsis")) | ||
set_specvar("PACKAGE_INSTALL_DIR", "XmacsLabs\\MoganResearch-"..XMACS_VERSION) | ||
set_specvar("PACKAGE_NAME", "MoganResearch") | ||
set_specvar("PACKAGE_SHORTCUT_NAME", "Mogan Research") | ||
set_iconfile(path.join(os.projectdir(), "packages/windows/Xmacs.ico")) | ||
set_bindir("bin") | ||
add_installfiles(path.join(os.projectdir(), "build/packages/app.mogan/data/bin/(**)|MoganResearch.exe"), {prefixdir = "bin"}) | ||
end | ||
|
||
add_targets("research") | ||
|
||
if is_plat ("linux") and linuxos.name() == "fedora" then | ||
add_sourcefiles("(src/**)") | ||
add_sourcefiles("(TeXmacs/**)") | ||
add_sourcefiles("(xmake/**)") | ||
add_sourcefiles("(tests/**)") | ||
add_sourcefiles("xmake.lua") | ||
end | ||
|
||
if is_plat("linux") then | ||
on_load(function (package) | ||
if package:with_source() then | ||
package:set("basename", "goldfish-$(plat)-src-v$(version)") | ||
else | ||
package:set("basename", "goldfish-$(plat)-$(arch)-v$(version)") | ||
end | ||
end) | ||
end | ||
|
||
if is_plat("windows") then | ||
on_load(function (package) | ||
local format = package:format() | ||
if format == "nsis" then | ||
package:set("basename", "MoganResearch-v" .. package:version() .. "-64bit-installer") | ||
else | ||
package:set("basename", "MoganResearch-v" .. package:version() .. "-64bit-portable") | ||
end | ||
end) | ||
end | ||
end | ||
end | ||
|
||
|
||
-- Mogan Beamer | ||
if is_plat("macosx", "windows") then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters