extensions-cmake-ninja #1
No files matched your search
@@ -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 +1,2 @@
|
|||||||
tte
|
tte
|
||||||
|
build
|
||||||
@@ -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)
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
DESTDIR=/
|
||||||
|
|
||||||
tte: tte.c
|
tte: tte.c
|
||||||
$(CC) tte.c -o tte -std=c99
|
$(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
|
$(CC) tte.c -o tte -Wall -Wextra -pedantic -std=c99 -g
|
||||||
|
|
||||||
install: tte
|
install: tte
|
||||||
sudo cp tte /usr/local/bin/
|
sudo cp tte $(DESTDIR)/usr/bin/
|
||||||
sudo chmod +x /usr/local/bin/
|
|
||||||
|
uninstall:
|
||||||
|
sudo rm -v /usr/bin/tte
|
||||||
@@ -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
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
project('tte', 'c', default_options : ['c_std=c99'])
|
||||||
|
executable(
|
||||||
|
'tte',
|
||||||
|
'tte.c'
|
||||||
|
)
|
||||||
@@ -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* C_HL_extensions[] = {".c", ".h", ".cpp", ".hpp", ".cc", NULL}; // Array must be terminated with NULL.
|
||||||
char* JAVA_HL_extensions[] = {".java", NULL};
|
char* JAVA_HL_extensions[] = {".java", NULL};
|
||||||
char* PYTHON_HL_extensions[] = {".py",".pyw",".py3",".pyc",".pyo", 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* JS_HL_extensions[] = {".js", ".jsx", NULL};
|
||||||
char* PHP_HL_extensions[] = {".php",".phtml", NULL};
|
char* PHP_HL_extensions[] = {".php",".phtml", NULL};
|
||||||
char* JSON_HL_extensions[] = {".json", ".jsonp", NULL};
|
char* JSON_HL_extensions[] = {".json", ".jsonp", NULL};
|
||||||
@@ -2082,7 +2082,6 @@ void initEditor() {
|
|||||||
ec.syntax = NULL;
|
ec.syntax = NULL;
|
||||||
ec.actions = actionListInit();
|
ec.actions = actionListInit();
|
||||||
|
|
||||||
editorUpdateWindowSize();
|
|
||||||
// The SIGWINCH signal is sent to a process when its controlling
|
// The SIGWINCH signal is sent to a process when its controlling
|
||||||
// terminal changes its size (a window change).
|
// terminal changes its size (a window change).
|
||||||
signal(SIGWINCH, editorHandleSigwinch);
|
signal(SIGWINCH, editorHandleSigwinch);
|
||||||
@@ -2155,6 +2154,7 @@ int main(int argc, char* argv[]) {
|
|||||||
editorOpen(argv[argc - 1]);
|
editorOpen(argv[argc - 1]);
|
||||||
else if (arg_response == -1)
|
else if (arg_response == -1)
|
||||||
return 0;
|
return 0;
|
||||||
|
editorUpdateWindowSize();
|
||||||
enableRawMode();
|
enableRawMode();
|
||||||
|
|
||||||
editorSetStatusMessage(" Ctrl-Q to quit | Ctrl-S to save | (tte -h | --help for more info)");
|
editorSetStatusMessage(" Ctrl-Q to quit | Ctrl-S to save | (tte -h | --help for more info)");
|
||||||
|
|||||||
Reference in new issue
Block a user