Merge pull request 'extensions-cmake-ninja' (#1) from extensions-cmake-ninja into main
Prepare Build and Testing executable binary / Archlinux-package (push) Waiting to run
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 13s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 27s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Has been cancelled

Reviewed-on: https://gitea.home.com:3000/TolaMironcenko/tte/pulls/1
This commit was merged in pull request #1.
This commit is contained in:
wt
2025-01-09 10:26:39 +03:00
7 changed files with 120 additions and 4 deletions
+72
View File
@@ -0,0 +1,72 @@
name: Prepare Build and Testing executable binary
run-name: ${{ gitea.actor }}
on: [push]
jobs:
Prepare-Build-Testing-With-Make:
runs-on: alpine-sdk
steps:
- name: prepare-container
run: |
echo "83.172.39.220 gitea.home.com" >> /etc/hosts
- name: Check out repository code
uses: actions/checkout@v3
- name: Building binary with make
run: |
make -j$(nproc)
- name: Testing to run binary builded with make
run: ./tte --version
Prepare-Build-Testing-With-CMake:
runs-on: alpine-sdk
steps:
- name: prepare-container
run: |
echo "83.172.39.220 gitea.home.com" >> /etc/hosts && \
apk add cmake
- name: Check out repository code
uses: actions/checkout@v3
- name: Building binary with CMake
run: |
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc)
- name: Testing to run binary builded with CMake
run: ./build/tte --version
Prepare-Build-Testing-With-Meson:
runs-on: alpine-sdk
steps:
- name: prepare-container
run: |
echo "83.172.39.220 gitea.home.com" >> /etc/hosts && \
apk add meson ninja cmake
- name: Check out repository code
uses: actions/checkout@v3
- name: Building binary with meson
run: |
meson setup build && \
ninja -C build
- name: Testing to run binary builded with meson
run: ./build/tte --version
Archlinux-package:
runs-on: archlinux-aarch64
steps:
- name: Download PKGBUILD file
run: |
mkdir workspace && \
cd workspace && \
curl \
https://gitea.home.com:3000/TolaMironcenko/tte/raw/branch/main/PKGBUILD \
-o PKGBUILD && \
sed "s/arch=('x86_64')/arch=('aarch64')/" -i PKGBUILD
- name: Build package
run: cd workspace && makepkg -f
- name: Push package
run: |
cd workspace && \
curl --user TolaMironcenko:d57cf51c49b425b42148e5a56882f8330bde011c \
--upload-file ./tte-git-1.0-1-aarch64.pkg.tar.xz \
https://gitea.home.com:3000/api/packages/TolaMironcenko/arch/home
+1
View File
@@ -1 +1,2 @@
tte
build
+10
View File
@@ -0,0 +1,10 @@
cmake_minimum_required (VERSION 2.6)
project(tte)
set(CMAKE_C_FLAGS "-std=c99")
add_executable(
tte
tte.c
)
install(TARGETS tte DESTINATION /usr/bin)
+6 -2
View File
@@ -1,3 +1,5 @@
DESTDIR=/
tte: tte.c
$(CC) tte.c -o tte -std=c99
@@ -5,5 +7,7 @@ debug: tte.c
$(CC) tte.c -o tte -Wall -Wextra -pedantic -std=c99 -g
install: tte
sudo cp tte /usr/local/bin/
sudo chmod +x /usr/local/bin/
sudo cp tte $(DESTDIR)/usr/bin/
uninstall:
sudo rm -v /usr/bin/tte
+24
View File
@@ -0,0 +1,24 @@
# Maintainer: Tola Mironcenko <mironcenkotola@gmail.com>
pkgname=tte-git
_pkgname="${pkgname%-git}"
_reponame=tte
pkgver=0.1.1
pkgrel=1
pkgdesc="Tiny Text Editor"
arch=('x86_64')
url="https://gitea.home.com:3000/TolaMironcenko/tte"
conflicts=("$_pkgname")
license=('GPL')
source=("git+$url.git")
cksums=('SKIP')
build() {
cd $_reponame
make
}
package() {
cd $_reponame
mkdir -p $pkgdir/usr/bin
make DESTDIR="$pkgdir" install
}
+5
View File
@@ -0,0 +1,5 @@
project('tte', 'c', default_options : ['c_std=c99'])
executable(
'tte',
'tte.c'
)
+2 -2
View File
@@ -175,7 +175,7 @@ typedef enum ActionType ActionType;
char* C_HL_extensions[] = {".c", ".h", ".cpp", ".hpp", ".cc", NULL}; // Array must be terminated with NULL.
char* JAVA_HL_extensions[] = {".java", NULL};
char* PYTHON_HL_extensions[] = {".py",".pyw",".py3",".pyc",".pyo", NULL};
char* BASH_HL_extensions[] = {".sh", NULL};
char* BASH_HL_extensions[] = {".sh", ".bash", ".zsh", NULL};
char* JS_HL_extensions[] = {".js", ".jsx", NULL};
char* PHP_HL_extensions[] = {".php",".phtml", NULL};
char* JSON_HL_extensions[] = {".json", ".jsonp", NULL};
@@ -2082,7 +2082,6 @@ void initEditor() {
ec.syntax = NULL;
ec.actions = actionListInit();
editorUpdateWindowSize();
// The SIGWINCH signal is sent to a process when its controlling
// terminal changes its size (a window change).
signal(SIGWINCH, editorHandleSigwinch);
@@ -2155,6 +2154,7 @@ int main(int argc, char* argv[]) {
editorOpen(argv[argc - 1]);
else if (arg_response == -1)
return 0;
editorUpdateWindowSize();
enableRawMode();
editorSetStatusMessage(" Ctrl-Q to quit | Ctrl-S to save | (tte -h | --help for more info)");