Add gitea workflows

This commit is contained in:
2026-02-04 23:08:04 -06:00
parent 45dcd9e7c5
commit 86c7d85f0e
4 changed files with 94 additions and 110 deletions

71
.gitea/workflows/tag.yaml Normal file
View File

@@ -0,0 +1,71 @@
name: Build and Deploy on Tag
on:
push:
tags:
- 'v*'
env:
GITEA_AUTH: ${{ secrets.MY_GITEA_AUTH }}
jobs:
build-arch:
runs-on: arch-builder
steps:
- run: pacman --noconfirm -Sy nodejs npm
- uses: actions/checkout@v4
- run: wget -O /root/repository.key https://git.tesseslanguage.com/api/packages/tesses50/arch/repository.key
- run: pacman-key --add /root/repository.key
- run: pacman-key --config /opt/cross/ppc/pacman.conf --add /root/repository.key
- run: printf "[tesses50.git.tesseslanguage.com]\nSigLevel = Optional TrustAll\nServer = https://git.tesseslanguage.com/api/packages/tesses50/arch/core/\$arch\n" >> /etc/pacman.conf
- run: printf "[tesses50.git.tesseslanguage.com]\nSigLevel = Optional TrustAll\nServer = https://git.tesseslanguage.com/api/packages/tesses50/arch/core/\$arch\n" >> /opt/cross/ppc/pacman.conf
- run: pacman --noconfirm -Sy mbedtls curl tesses-framework
- run: pacman --config /opt/cross/ppc/pacman.conf --noconfirm -Sy mbedtls tesses-framework
- run: cp Packaging/Linux/PKGBUILD /home/build/PKGBUILD
- run: cp Packaging/Linux/build-arch.sh /home/build/build-arch.sh
- run: chmod 755 /home/build/build-arch.sh
- run: chown build:build /home/build/PKGBUILD
- run: chown build:build /home/build/build-arch.sh
- run: su build -c /home/build/build-arch.sh
build-jammy:
runs-on: deb-builder-jammy
steps:
- uses: actions/checkout@v4
- name: Build for jammy, noble
run: |
mkdir ../../artifacts
apt update -y
apt install -y pkg-config git
cd Packaging/Linux
bash build-ubuntu-jammy.sh
bash push-ubuntu-jammy.sh
bash build-tars.sh
working-directory: ./Packaging/Linux
- uses: akkuman/gitea-release-action@v1
env:
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
with:
files: |-
artifacts/**
build-plucky:
runs-on: deb-builder-plucky
steps:
- uses: actions/checkout@v4
- name: Build for plucky, resolute
run: |
mkdir ../../artifacts
apt update -y
apt install -y pkg-config git gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gcc-mingw-w64-i686 g++-mingw-w64-i686 nsis
bash build-ubuntu-plucky.sh
bash push-ubuntu-plucky.sh
working-directory: ./Packaging/Linux
- name: Build for windows
run: bash build.sh
working-directory: ./Packaging/Windows
- uses: akkuman/gitea-release-action@v1
env:
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
with:
files: |-
artifacts/**

View File

@@ -1,18 +1,21 @@
version: 39 version: 43
jobs: jobs:
- name: Build for x86_64 - name: Build for x86_64
steps: steps:
- !CheckoutStep - type: CheckoutStep
name: Checkout name: Checkout
cloneCredential: !DefaultCredential {} cloneCredential:
type: DefaultCredential
withLfs: true withLfs: true
withSubmodules: false withSubmodules: false
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL condition: SUCCESSFUL
- !CommandStep optional: false
- type: CommandStep
name: Execute build name: Execute build
runInContainer: true runInContainer: true
image: onedev.site.tesses.net/tesses-framework/tesses-framework:latest image: onedev.site.tesses.net/tesses-framework/tesses-framework:latest
interpreter: !DefaultInterpreter interpreter:
type: DefaultInterpreter
commands: | commands: |
mkdir build mkdir build
cd build cd build
@@ -20,111 +23,32 @@ jobs:
make -j12 make -j12
make install DESTDIR=../out make install DESTDIR=../out
useTTY: true useTTY: true
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL condition: SUCCESSFUL
- !BuildImageStep optional: false
- type: BuildImageStep
name: Build Docker Image name: Build Docker Image
dockerfile: Dockerfile.run dockerfile: Dockerfile.run
output: !RegistryOutput output:
type: RegistryOutput
tags: onedev.site.tesses.net/crosslang/crosslang:latest onedev.site.tesses.net/crosslang/crosslang:@commit_hash@ tags: onedev.site.tesses.net/crosslang/crosslang:latest onedev.site.tesses.net/crosslang/crosslang:@commit_hash@
registryLogins: registryLogins:
- registryUrl: '@server_url@' - registryUrl: '@server_url@'
userName: '@job_token@' userName: '@job_token@'
passwordSecret: dockersecret passwordSecret: dockersecret
platforms: linux/amd64 platforms: linux/amd64
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL condition: SUCCESSFUL
- !CommandStep optional: false
name: Build archlinux
runInContainer: true
image: git.tesseslanguage.com/tesses50/arch-builds:2025-11-11
interpreter: !DefaultInterpreter
commands: |
wget -O /root/repository.key https://git.tesseslanguage.com/api/packages/tesses50/arch/repository.key
pacman-key --add /root/repository.key
pacman-key --config /opt/cross/ppc/pacman.conf --add /root/repository.key
printf "[tesses50.git.tesseslanguage.com]\nSigLevel = Optional TrustAll\nServer = https://git.tesseslanguage.com/api/packages/tesses50/arch/core/\$arch\n" >> /etc/pacman.conf
printf "[tesses50.git.tesseslanguage.com]\nSigLevel = Optional TrustAll\nServer = https://git.tesseslanguage.com/api/packages/tesses50/arch/core/\$arch\n" >> /opt/cross/ppc/pacman.conf
pacman --noconfirm -Sy mbedtls curl tesses-framework
pacman --config /opt/cross/ppc/pacman.conf --noconfirm -Sy mbedtls tesses-framework
cp Packaging/Linux/PKGBUILD /home/build/PKGBUILD
cp Packaging/Linux/build-arch.sh /home/build/build-arch.sh
chmod 755 /home/build/build-arch.sh
chown build:build /home/build/PKGBUILD
chown build:build /home/build/build-arch.sh
su build -c /home/build/build-arch.sh
envVars:
- name: GITEA_AUTH
value: '@secret:GITEA_AUTH@'
useTTY: true
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !CommandStep
name: Build and Publish Deb Package (Plucky)
runInContainer: true
image: onedev.site.tesses.net/dependencies/debbuilder/plucky:latest
interpreter: !DefaultInterpreter
commands: |
mkdir artifacts
apt update -y
apt install -y pkg-config git gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gcc-mingw-w64-i686 g++-mingw-w64-i686 nsis
cd Packaging/Linux
bash build-ubuntu-plucky.sh
bash push-ubuntu-plucky.sh
cd ../Windows
bash build.sh
envVars:
- name: GITEA_AUTH
value: '@secret:GITEA_AUTH@'
- name: BUILD_NO
value: '@build_number@'
useTTY: true
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !CommandStep
name: Build and Publish Deb Package
runInContainer: true
image: onedev.site.tesses.net/dependencies/debbuilder/jammy:latest
interpreter: !DefaultInterpreter
commands: |
apt update -y
apt install -y pkg-config git
cd Packaging/Linux
bash build-ubuntu-jammy.sh
bash push-ubuntu-jammy.sh
bash build-tars.sh
envVars:
- name: GITEA_AUTH
value: '@secret:GITEA_AUTH@'
- name: CPKG_KEY
value: '@secret:CPKG_KEY@'
- name: BUILD_NO
value: '@build_number@'
useTTY: true
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !SCPCommandStep
name: Copy Files
privateKeySecret: TRUENAS_SSH
source: artifacts
target: mike@@10.137.42.30:/mnt/storage24tb/Files/Public/CrossLang/@build_number@
options: -r
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !SSHCommandStep
name: Link latest
remoteMachine: 10.137.42.30
userName: mike
privateKeySecret: TRUENAS_SSH
commands: |
cd /mnt/storage24tb/Files/Public/CrossLang
rm -f latest
ln -s @build_number@ latest
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
triggers: triggers:
- !DependencyFinishedTrigger - type: DependencyFinishedTrigger
projects: tesses-framework projects: tesses-framework
- !BranchUpdateTrigger - type: BranchUpdateTrigger
branches: master branches: master
userMatch: anyone
projects: crosslang projects: crosslang
projectDependencies: projectDependencies:
- projectPath: tesses-framework - projectPath: tesses-framework
buildProvider: !LastFinishedBuild buildProvider:
type: LastFinishedBuild
jobName: Build for x86_64 jobName: Build for x86_64
artifacts: '*' artifacts: '*'
retryCondition: never retryCondition: never

View File

@@ -21,18 +21,7 @@ fi
# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for # Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
# a description of each element in the source array. # a description of each element in the source array.
pkgver() {
cd "$srcdir/${pkgname}"
# The examples below are not absolute and need to be adapted to each repo. The
# primary goal is to generate version numbers that will increase according to
# pacman's version comparisons with later commits to the repo. The format
# VERSION='VER_NUM.rREV_NUM.HASH', or a relevant subset in case VER_NUM or HASH
# are not available, is recommended.
# Git, no tags available
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() { prepare() {
cd "$srcdir/${pkgname}" cd "$srcdir/${pkgname}"

View File

@@ -1,2 +1,2 @@
export BUILD=$(($BUILD_NO-153))
export DEB_VERSION=0.0.1-$BUILD export DEB_VERSION=0.0.1