mirror of
https://github.com/vrc-get/vrc-get.git
synced 2026-06-21 09:58:08 +00:00
ci: add debian package and build on ci
This commit is contained in:
parent
23b1bb2515
commit
ba9ad1f59c
12 changed files with 301 additions and 7 deletions
119
.github/workflows/ci-gui.yml
vendored
119
.github/workflows/ci-gui.yml
vendored
|
|
@ -121,6 +121,7 @@ jobs:
|
|||
target/${{ matrix.triple }}/release/bundle/*/vrc-get*
|
||||
target/${{ matrix.triple }}/release/bundle/*/ALCOM*
|
||||
target/${{ matrix.triple }}/release/bundle/*/alcom*
|
||||
|
||||
build-rpm:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
@ -158,23 +159,23 @@ jobs:
|
|||
run: |
|
||||
COMMIT_HASH="$(git rev-parse HEAD)"
|
||||
SHORT_HASH="$(git rev-parse --short HEAD)"
|
||||
RPM_VERSION="$(<vrc-get-gui/Cargo.toml sed -En -e '/^version/{s/.*"(.*)".*/\1/; s/-/~/p;}')+${SHORT_HASH}"
|
||||
PKG_VERSION="$(<vrc-get-gui/Cargo.toml sed -En -e '/^version/{s/.*"(.*)".*/\1/; s/-/~/p;}')+${SHORT_HASH}"
|
||||
|
||||
echo "RPM_VERSION=$RPM_VERSION" >> $GITHUB_ENV
|
||||
echo "PKG_VERSION=$PKG_VERSION" >> $GITHUB_ENV
|
||||
|
||||
sed -i vrc-get-gui/bundle/alcom.spec -e "/%define commit /c\%define commit ${COMMIT_HASH}"
|
||||
sed -i vrc-get-gui/bundle/alcom.spec -e "/^Version:/c\Version: ${RPM_VERSION}"
|
||||
sed -i vrc-get-gui/bundle/alcom.spec -e "/^Version:/c\Version: ${PKG_VERSION}"
|
||||
sed -i vrc-get-gui/bundle/alcom.spec -e "/# marker: ci inserts version update here/c\sed -i '/^version/s/\"$/+${SHORT_HASH}\"/' vrc-get-gui/Cargo.toml"
|
||||
- name: build source rpm package
|
||||
run: eval "rpmbuild -bs vrc-get-gui/bundle/alcom.spec $RPMBUILD_OPTS --undefine=_disable_source_fetch"
|
||||
- name: build rpm package
|
||||
run: eval "mock -v -r '$(ls -1 /etc/mock{/eol,}/$MOCK_ENV.cfg 2>/dev/null)' --enable-network $RPMBUILD_OPTS rebuild ~/rpmbuild/SRPMS/alcom-$RPM_VERSION-1*.src.rpm"
|
||||
run: eval "mock -v -r '$(ls -1 /etc/mock{/eol,}/$MOCK_ENV.cfg 2>/dev/null)' --enable-network $RPMBUILD_OPTS rebuild ~/rpmbuild/SRPMS/alcom-$PKG_VERSION-1*.src.rpm"
|
||||
- name: copy built binaries
|
||||
run: |
|
||||
mkdir -p artifacts
|
||||
cp vrc-get-gui/bundle/alcom.spec artifacts/
|
||||
cp ~/rpmbuild/SRPMS/alcom-$RPM_VERSION-1*.src.rpm artifacts/
|
||||
cp /var/lib/mock/$MOCK_ENV/result/alcom-$RPM_VERSION-1*.${MOCK_ENV##*-}.rpm artifacts/
|
||||
cp ~/rpmbuild/SRPMS/alcom-$PKG_VERSION-1*.src.rpm artifacts/
|
||||
cp /var/lib/mock/$MOCK_ENV/result/alcom-$PKG_VERSION-1*.${MOCK_ENV##*-}.rpm artifacts/
|
||||
|
||||
- name: Upload built binary
|
||||
uses: actions/upload-artifact@v7
|
||||
|
|
@ -182,10 +183,114 @@ jobs:
|
|||
name: rpm-${{ matrix.mock-env }}
|
||||
path: artifacts/*
|
||||
|
||||
build-deb:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- install_rust: false
|
||||
- install_nodejs: false
|
||||
|
||||
# Old distributions have older tools than we need. Download tools in build process
|
||||
- pbuilder-distribution: bookworm
|
||||
install_rust: true
|
||||
install_nodejs: true
|
||||
- pbuilder-distribution: mantic
|
||||
install_rust: true
|
||||
install_nodejs: true
|
||||
|
||||
# Debian uses mirror from debian-archive.trafficmanager.net which is managed by microsoft on azure
|
||||
- pbuilder-distribution: bookworm
|
||||
mirror: http://debian-archive.trafficmanager.net/debian/
|
||||
keyring: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
- pbuilder-distribution: sid
|
||||
mirror: http://debian-archive.trafficmanager.net/debian/
|
||||
keyring: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
# Ubuntu legacy release
|
||||
- pbuilder-distribution: mantic
|
||||
mirror: https://old-releases.ubuntu.com/ubuntu/
|
||||
keyring: /usr/share/keyrings/ubuntu-archive-keyring.gpg
|
||||
# For note,
|
||||
# bookworm: libc6@2.36
|
||||
# sid: libc6@2.39 as of 2026/06/14
|
||||
# mantic: libc6@2.38
|
||||
pbuilder-distribution:
|
||||
# debian distribution
|
||||
- bookworm
|
||||
- sid
|
||||
# ubuntu distribution
|
||||
- mantic # mantic is the oldest ubuntu release with libwebkit2gtk-4.1 >= 2.41
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PBUILDER_DISTRIBUTION: ${{ matrix.pbuilder-distribution }}
|
||||
PBUILDER_MIRROR: ${{ matrix.mirror }}
|
||||
PBUILDER_KEYRING: ${{ matrix.keyring }}
|
||||
INSTALL_RUST: ${{ case(matrix.install_rust, '1', '0') }}
|
||||
INSTALL_NODEJS: ${{ case(matrix.install_nodejs, '1', '0') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
path: vrc-get
|
||||
submodules: recursive
|
||||
- name: install dependencies
|
||||
run: sudo apt update && sudo apt install -y pbuilder debian-archive-keyring debhelper-compat=13
|
||||
- name: prepare deb build environment
|
||||
working-directory: vrc-get
|
||||
run: |
|
||||
cp -r vrc-get-gui/bundle/debian debian
|
||||
sudo pbuilder create --debootstrapopts --keyring=$PBUILDER_KEYRING --mirror $PBUILDER_MIRROR --distribution $PBUILDER_DISTRIBUTION
|
||||
- name: update changelog
|
||||
working-directory: vrc-get
|
||||
run: |
|
||||
COMMIT_HASH="$(git rev-parse HEAD)"
|
||||
SHORT_HASH="$(git rev-parse --short HEAD)"
|
||||
PKG_VERSION="$(<vrc-get-gui/Cargo.toml sed -En -e '/^version/{s/.*"(.*)".*/\1/; s/-/~/p;}')+${SHORT_HASH}"
|
||||
|
||||
echo "PKG_VERSION=$PKG_VERSION" >> $GITHUB_ENV
|
||||
|
||||
cp debian/changelog debian/changelog.bak
|
||||
cat - debian/changelog.bak <<CHANGELOG > debian/changelog
|
||||
alcom (${PKG_VERSION}-1) experimental;
|
||||
|
||||
* Upgraded version to ${PKG_VERSION}
|
||||
|
||||
-- anatawa12 <i@anatawa12.com> $(date -u +"%a, %d %b %Y %H:%M:%S +0000")
|
||||
|
||||
CHANGELOG
|
||||
rm debian/changelog.bak
|
||||
|
||||
echo cat debian/changelog
|
||||
cat debian/changelog
|
||||
dpkg-parsechangelog
|
||||
- name: build source deb package
|
||||
working-directory: vrc-get
|
||||
run: |
|
||||
git archive --format=tar HEAD | xz > ../alcom_$PKG_VERSION.orig.tar.xz
|
||||
dpkg-buildpackage -d -S
|
||||
- name: build deb package
|
||||
working-directory: vrc-get
|
||||
run: |
|
||||
sudo --preserve-env=INSTALL_RUST,INSTALL_NODEJS pbuilder build --use-network yes --distribution $PBUILDER_DISTRIBUTION ../alcom_$PKG_VERSION-1.dsc
|
||||
- name: copy built binaries
|
||||
run: |
|
||||
mkdir -p artifacts
|
||||
cp vrc-get/debian/changelog artifacts/
|
||||
cp /var/cache/pbuilder/result/alcom_$PKG_VERSION* artifacts/
|
||||
ls artifacts
|
||||
- name: Print information about built package
|
||||
run: dpkg-deb -I artifacts/alcom_$PKG_VERSION-1_*.deb
|
||||
|
||||
- name: Upload built binary
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: deb-${{ matrix.pbuilder-distribution }}
|
||||
path: artifacts/*
|
||||
|
||||
conclude-gui:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ always() }}
|
||||
needs: [ build-gui, build-rpm ]
|
||||
needs: [ build-gui, build-rpm, build-deb ]
|
||||
steps:
|
||||
- name: Conclude Tests
|
||||
env: { NEEDS: "${{ toJSON(needs) }}" }
|
||||
|
|
|
|||
7
vrc-get-gui/bundle/debian/.gitignore
vendored
Normal file
7
vrc-get-gui/bundle/debian/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/*-build-stamp
|
||||
/*.substvars
|
||||
/.debhelper
|
||||
/files
|
||||
/cargo_home
|
||||
/npm_cache
|
||||
alcom/
|
||||
5
vrc-get-gui/bundle/debian/README.Debian
Normal file
5
vrc-get-gui/bundle/debian/README.Debian
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
alcom for Debian
|
||||
|
||||
ALCOM is a fast and open-source alternative VCC (VRChat Creator Companion) written in rust and tauri.
|
||||
|
||||
-- anatawa12 <i@anatawa12.com> Thu, 11 Jun 2026 14:34:57 +0000
|
||||
20
vrc-get-gui/bundle/debian/README.source
Normal file
20
vrc-get-gui/bundle/debian/README.source
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
alcom for Debian
|
||||
|
||||
This is README for alcom Debian package.
|
||||
|
||||
This Debian package is made to provide one of official distribution of alcom, formaly known as vrc-get-gui.
|
||||
Starting with 1.1.7 or later, alcom maintainer switched from custom .deb toolchain to official .deb toolchain.
|
||||
This directory contains source code of debian package as non-native package.
|
||||
|
||||
This directory is placed at vrc-get-gui/bundles/debian on original source tree, but before building debian package,
|
||||
you must copy vrc-get-gui/bundles/debian to debian.
|
||||
|
||||
Violating best practice of debian package, this package requires network access, to download cargo dependencies on build.
|
||||
In addition, by declaring `INSTALL_RUST` environment variable to `1` with `--set-envvar=INSTALL_RUST=1`, you can let
|
||||
build process to install newest available rust to build on older distribution does not provide new enough rust version.
|
||||
You also install NODEJS on build by declaring `INSTALL_NODEJS=1`.
|
||||
Those options are helpful when building inside sandbox like pbuilder.
|
||||
|
||||
This Debian package is based on package generated by debmake Version 4.5.1.
|
||||
|
||||
-- anatawa12 <i@anatawa12.com> Thu, 11 Jun 2026 14:34:57 +0000
|
||||
5
vrc-get-gui/bundle/debian/changelog
Normal file
5
vrc-get-gui/bundle/debian/changelog
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
alcom (1.1.6-1) UNRELEASED; urgency=low
|
||||
|
||||
* No changelog are provided for this package
|
||||
|
||||
-- root <i@anatawa12.com> Thu, 11 Jun 2026 14:34:57 +0000
|
||||
8
vrc-get-gui/bundle/debian/clean
Normal file
8
vrc-get-gui/bundle/debian/clean
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
target/
|
||||
vrc-get-gui/node_modules/
|
||||
vrc-get-gui/out/
|
||||
vrc-get-gui/gen/
|
||||
debian/cargo_home/
|
||||
debian/npm_cache/
|
||||
debian/rustup_home/
|
||||
debian/nodejs_installed/
|
||||
29
vrc-get-gui/bundle/debian/control
Normal file
29
vrc-get-gui/bundle/debian/control
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
Source: alcom
|
||||
Priority: optional
|
||||
Maintainer: anatawa12 <i@anatawa12.com>
|
||||
Build-Depends:
|
||||
debhelper-compat (= 13),
|
||||
libssl-dev,
|
||||
pkg-config,
|
||||
cargo,
|
||||
nodejs,
|
||||
npm,
|
||||
# curl for rust-install build only
|
||||
curl,
|
||||
libgtk-3-dev,
|
||||
libwebkit2gtk-4.1-dev (>= 2.41),
|
||||
Standards-Version: 4.7.0
|
||||
Homepage: https://vrc-get.anatawa12.com/alcom/
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: alcom
|
||||
Architecture: any
|
||||
Multi-Arch: foreign
|
||||
Depends:
|
||||
${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
Description: ALCOM - Alternative Creator Companion
|
||||
ALCOM is a fast and open-source alternative VCC (VRChat Creator Companion) written in rust and tauri.
|
||||
.
|
||||
This package is one of official distribution of ALCOM, released as a part of the updates from ALCOM.
|
||||
No packaging only updates will be provided.
|
||||
41
vrc-get-gui/bundle/debian/copyright
Normal file
41
vrc-get-gui/bundle/debian/copyright
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: alcom
|
||||
Upstream-Contact: <preferred name and address to reach the upstream project>
|
||||
Source: <url://example.com>
|
||||
|
||||
Files: *
|
||||
Copyright: Copyright (c) 2023 anatawa12 and other contribcmeutors
|
||||
License: MIT
|
||||
MIT License
|
||||
.
|
||||
Copyright (c) 2023 anatawa12 and other contributors
|
||||
.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
.
|
||||
|
||||
Files: vrc-get-gui/third-party/Anton-Regular.ttf
|
||||
vrc-get-gui/third-party/NotoSans-Italic-VariableFont_wdth,wght.ttf
|
||||
vrc-get-gui/third-party/NotoSans-VariableFont_wdth,wght.ttf
|
||||
Copyright: 2020 The Anton Project Authors (https://github.com/googlefonts/AntonFont.git)
|
||||
2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
|
||||
License: SIL Open Font License 1.1
|
||||
|
||||
Files: vrc-get-gui/icons/*
|
||||
Copyright: 2024 lilxyzw, anatawa12 and other contributors
|
||||
License: CC-BY-4.0
|
||||
39
vrc-get-gui/bundle/debian/rules
Executable file
39
vrc-get-gui/bundle/debian/rules
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
export DEB_BUILD_OPTIONS += nostrip
|
||||
|
||||
export CARGO_HOME = $(CURDIR)/debian/cargo_home
|
||||
export NPM_CONFIG_CACHE = $(CURDIR)/debian/npm_cache
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
# install rust in configure phase when requested
|
||||
ifeq ($(INSTALL_RUST),1)
|
||||
export RUSTUP_HOME = $(CURDIR)/debian/rustup_home
|
||||
export PATH := $(CURDIR)/debian/cargo_home/bin:$(PATH)
|
||||
|
||||
override_dh_auto_configure::
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path
|
||||
endif
|
||||
|
||||
ifeq ($(INSTALL_NODEJS),1)
|
||||
export RUSTUP_HOME = $(CURDIR)/debian/rustup_home
|
||||
export PATH := $(CURDIR)/debian/nodejs_installed/bin:$(PATH)
|
||||
|
||||
ifeq ($(DEB_HOST_ARCH),amd64)
|
||||
NODE_ARCH := x64
|
||||
else ifeq ($(DEB_HOST_ARCH),arm64)
|
||||
NODE_ARCH := arm64
|
||||
endif
|
||||
|
||||
override_dh_auto_configure::
|
||||
mkdir -p $(CURDIR)/debian/nodejs_installed
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://nodejs.org/dist/v26.3.0/node-v26.3.0-linux-$(NODE_ARCH).tar.gz | gunzip | tar x --strip-components 1 -C $(CURDIR)/debian/nodejs_installed
|
||||
endif
|
||||
|
||||
override_dh_auto_build:
|
||||
cargo xtask build-alcom --release
|
||||
|
||||
override_dh_auto_install:
|
||||
cargo xtask bundle-alcom --release --bundles buildroot --buildroot=$(CURDIR)/debian/alcom
|
||||
1
vrc-get-gui/bundle/debian/source/format
Normal file
1
vrc-get-gui/bundle/debian/source/format
Normal file
|
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
||||
24
vrc-get-gui/bundle/debian/upstream/metadata
Normal file
24
vrc-get-gui/bundle/debian/upstream/metadata
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Metadata about the upstream project.
|
||||
# See https://wiki.debian.org/UpstreamMetadata
|
||||
|
||||
Bug-Database: https://github.com/vrc-get/vrc-get/issues
|
||||
Bug-Submit: https://github.com/vrc-get/vrc-get/issues/new
|
||||
Changelog: https://github.com/vrc-get/vrc-get/blob/master/vrc-get-gui/CHANGELOG.md
|
||||
Documentation: https://vrc-get.anatawa12.com/alcom/
|
||||
Repository-Browse: https://github.com/vrc-get/vrc-get
|
||||
Repository: https://github.com/vrc-get/vrc-get.git
|
||||
#FAQ: https://github.com/<user>/<project>/blob/main/FAQ.md
|
||||
Donation: https://github.com/sponsors/anatawa12
|
||||
#Registration: https://github.com/signup
|
||||
#Archive: PyPI # or CPAN, boost, etc.
|
||||
|
||||
# Uncomment these and fill them out to help users evaluate upstream:
|
||||
#Gallery: https://github.com/<user>/<project>/wiki/pictures-made-with-this-program
|
||||
#Screenshots: # pictures *of* the program, as opposed to pictures *made with* the program
|
||||
# - https://github.com/<user>/<project>/wiki/login-screen.png
|
||||
# - https://github.com/<user>/<project>/wiki/help-menu.png
|
||||
# - ...
|
||||
|
||||
# Uncomment these and fill them out to help resolve security issues:
|
||||
#Security-Contact: <how to send security-related messages>
|
||||
#CPE: <space-separated Common Platform Enumerator values - see https://wiki.debian.org/CPEtagPackagesDep>
|
||||
10
vrc-get-gui/bundle/debian/watch
Normal file
10
vrc-get-gui/bundle/debian/watch
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# You must remove unused comment lines for the released package.
|
||||
# Compulsory line, this is a version 4 file
|
||||
version=4
|
||||
opts=\
|
||||
filenamemangle=s%.*/@ANY_VERSION@%@PACKAGE@-$1.tar.gz%,\
|
||||
downloadurlmangle=s%(api.github.com/repos/[^/]+/[^/]+)/git/refs/%$1/tarball/refs/%g,\
|
||||
uversionmangle=s/(\d)[-]?((RC|rc|pre|dev|beta|alpha)\.\d*)$/$1~$2/,\
|
||||
searchmode=plain \
|
||||
https://api.github.com/repos/vrc-get/vrc-get/git/matching-refs/tags/gui- \
|
||||
https://api.github.com/repos/[^/]+/[^/]+/git/refs/tags/gui-@ANY_VERSION@
|
||||
Loading…
Add table
Add a link
Reference in a new issue