Compare commits

..

4 Commits

Author SHA1 Message Date
81b44e1702 Experimenting with Gitea Actions
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
2025-01-27 13:58:13 +01:00
c8f897cf8d Add Gource 2025-01-27 11:28:25 +01:00
c0525c2bc8 Add autoupdate and extra go checking to pre-commit steps. 2025-01-27 11:19:57 +01:00
3f6ba6e9dc #12 Update README.md 2025-01-27 00:59:29 +01:00
4 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,20 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."

View File

@ -2,9 +2,17 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-imports
- id: no-go-testing
- id: golangci-lint
- id: go-unit-tests

View File

@ -9,10 +9,19 @@ _(This was a learning project to get a better grasp of Golang. But more importan
I wrote [a blog post](https://blog.ligthert.net/posts/exploration-fun-and-process-cycles-of-sudoku/) about this.
## Features
* Worlds least efficient Sudoku solver
* Ability to assign a number of CPU cores to this task
* Split workloads among several computers
## Usage
To use the sudoku solver, run the binary with all the parameters available:
```
Usage of ./sudoku-funpark:
-numcpu int
Number of CPU cores to assign to this task. (default 12)
-part int
Process part x in n parts. Cannot be lower than 1, or higher than specified in split. (default 1)
-row1 string
1st row of the sudoku puzzle. (default "000000000")
-row2 string
@ -31,6 +40,8 @@ Usage of ./sudoku-funpark:
8th row of the sudoku puzzle. (default "000000000")
-row9 string
9th row of the sudoku puzzle. (default "000000000")
-split int
Split the tasks in n parts. This depends on the availability of the first row. (default 1)
```
Instead of using the 3x3 blocks with 3x3 digits, it uses horizontal rows from top to bottom.

View File

@ -21,6 +21,7 @@ tasks:
silent: true
precommit:
cmds:
- pre-commit autoupdate
- pre-commit run --all
silent: true
lint:
@ -33,3 +34,7 @@ tasks:
- rm {{.BUILD_DIR}}/* || true
- go tool dist list | grep -v android | grep -v ios | grep -v wasip1 | awk -F '/' '{printf "echo Compiling %s/%s; env CGO_ENABLED=1 GOOS=%s GOARCH=%s go build -o {{.BUILD_DIR}}/{{.APP}}.%s-%s\n",$1,$2,$1,$2,$1,$2 }' | sh
- for i in `ls {{.BUILD_DIR}}/*windows*`; do mv -v $i $i.exe; done
gource:
cmds:
- gource --auto-skip-seconds 1 --key -r 60
silent: true