Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1dec3e5ee9 | |||
| e383f84d29 | |||
| 9426f4267b | |||
| bb82ae6458 | |||
| 70c2f02b0b |
@@ -0,0 +1,33 @@
|
|||||||
|
name: C-lang CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["master"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["master"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: gcc
|
||||||
|
run: mkdir -p build && gcc -v -Wall -Wextra -Werror src/*.c src/*.h -lm
|
||||||
|
|
||||||
|
build-release:
|
||||||
|
needs: lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: aclocal
|
||||||
|
run: aclocal
|
||||||
|
- name: autoconf
|
||||||
|
run: autoconf
|
||||||
|
- name: automake
|
||||||
|
run: automake --add-missing
|
||||||
|
- name: configure
|
||||||
|
run: ./configure
|
||||||
|
- name: make
|
||||||
|
run: make
|
||||||
|
- name: make distcheck
|
||||||
|
run: make distcheck
|
||||||
@@ -7,6 +7,8 @@ build
|
|||||||
Makefile
|
Makefile
|
||||||
*.log
|
*.log
|
||||||
*.o
|
*.o
|
||||||
|
*.h.gch
|
||||||
|
*.out
|
||||||
.dirstamp
|
.dirstamp
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
compile
|
compile
|
||||||
|
|||||||
+2
-2
@@ -9,7 +9,7 @@ clean:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
@mkdir -p build
|
@mkdir -p build
|
||||||
gcc -Wall src/*.c src/*.h -lm -o build/$(TARGET)
|
gcc -v -Wall -Wextra src/*.c src/*.h -lm -o build/$(TARGET)
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: build
|
install: build
|
||||||
@@ -41,7 +41,7 @@ release-arch: clean
|
|||||||
gif: build
|
gif: build
|
||||||
mkdir -p tmp
|
mkdir -p tmp
|
||||||
for i in {1..50}; do \
|
for i in {1..50}; do \
|
||||||
./build/margen -w=1920 -h=720 --seed=$$i$$i -o=tmp/image$$i.bmp ; \
|
./build/$(TARGET) -w=1920 -h=720 --seed=$$i$$i -o=tmp/image$$i.bmp ; \
|
||||||
done
|
done
|
||||||
ffmpeg -y -f image2 -framerate 1 -i tmp/image%d.bmp -vf scale=960x360 images/sample.gif
|
ffmpeg -y -f image2 -framerate 1 -i tmp/image%d.bmp -vf scale=960x360 images/sample.gif
|
||||||
rm -rf tmp
|
rm -rf tmp
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
pkgname=margen
|
pkgname=margen
|
||||||
pkgver=1.2.3
|
pkgver=1.2.5
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Generate a marble-like pattern bitmap image, blazing fast."
|
pkgdesc="Generate a marble-like pattern bitmap image, blazing fast."
|
||||||
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64' 'riscv64')
|
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64' 'riscv64')
|
||||||
url="https://github.com/klemek/margen"
|
url="https://github.com/klemek/margen"
|
||||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/klemek/margen/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/klemek/margen/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
|
||||||
sha256sums=('6922843b9cd1bcbca1dc65ca2cac1e4bf590487e77a06e21969a3432dc74963b')
|
sha256sums=('ff4375dacec14bce1f67bb6964232c54b184f820aaad02fda4313c58d78133c6')
|
||||||
srcdir=build
|
srcdir=build
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ generate a marble-like pattern bitmap image, blazing fast.
|
|||||||
|
|
||||||
options:
|
options:
|
||||||
--help show this help message and exit
|
--help show this help message and exit
|
||||||
|
-v, --version print version
|
||||||
-q, --quiet do not print to console
|
-q, --quiet do not print to console
|
||||||
-w, --width image width (default: 1920)
|
-w, --width image width (default: 1920)
|
||||||
-h, --height image height (default: 1080)
|
-h, --height image height (default: 1080)
|
||||||
@@ -70,18 +71,21 @@ options:
|
|||||||
## Release guide
|
## Release guide
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# get latest version
|
||||||
|
git pull origin master
|
||||||
# update configure.ac with new version
|
# update configure.ac with new version
|
||||||
$EDITOR configure.ac
|
$EDITOR configure.ac
|
||||||
# make full build
|
# make full build
|
||||||
make -f Makefile.dev release
|
make -f Makefile.dev release
|
||||||
|
# update PKGBUILD with new version and sha256 sum
|
||||||
|
sha256sum margen-x.y.z.tar.gz
|
||||||
|
$EDITOR PKGBUILD
|
||||||
# push to repo
|
# push to repo
|
||||||
git commit -am "margen vX.Y.Z"
|
git commit -am "margen vX.Y.Z"
|
||||||
git tag vX.Y.Z
|
git tag vX.Y.Z
|
||||||
git push origin master --tags
|
git push origin master --tags
|
||||||
# create release from tag on github
|
# create release from tag on github
|
||||||
# update PKGBUILD with new sha256 sum
|
# attach .tar.gz to the github release
|
||||||
sha256sum margen-x.y.z.tar.gz
|
|
||||||
make -f Makefile.dev release-arch
|
make -f Makefile.dev release-arch
|
||||||
git commit -am "update arch sha256"
|
# attach .pkg.tar.zst to the github release
|
||||||
# add .pkg.tar.zst on the release
|
|
||||||
```
|
```
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
AC_INIT([margen], [1.2.3], [klemek.dev@proton.me])
|
AC_INIT([margen], [1.2.5], [klemek.dev@proton.me])
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_CHECK_HEADERS([stdio.h])
|
AC_CHECK_HEADERS([stdio.h])
|
||||||
|
|||||||
+3
-1
@@ -1,6 +1,7 @@
|
|||||||
#include "args.h"
|
#include "args.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "rand.h"
|
#include "rand.h"
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -28,6 +29,7 @@ void print_help(int status_code) {
|
|||||||
"generate a marble-like pattern bitmap image, blazing fast.\n\n"
|
"generate a marble-like pattern bitmap image, blazing fast.\n\n"
|
||||||
"options:\n"
|
"options:\n"
|
||||||
" --help show this help message and exit\n"
|
" --help show this help message and exit\n"
|
||||||
|
" -v, --version print version\n"
|
||||||
" -q, --quiet do not print to console\n"
|
" -q, --quiet do not print to console\n"
|
||||||
" -w, --width image width (default: 1920)\n"
|
" -w, --width image width (default: 1920)\n"
|
||||||
" -h, --height image height (default: 1080)\n"
|
" -h, --height image height (default: 1080)\n"
|
||||||
@@ -68,7 +70,7 @@ bool is_number(char *value) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
unsigned long value_len = strlen(value);
|
unsigned long value_len = strlen(value);
|
||||||
int i;
|
unsigned int i;
|
||||||
for (i = 0; i < value_len; i++) {
|
for (i = 0; i < value_len; i++) {
|
||||||
if (!is_digit(value[i])) {
|
if (!is_digit(value[i])) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user