Skip to content

Commit

Permalink
ci: init
Browse files Browse the repository at this point in the history
  • Loading branch information
phip1611 committed Sep 28, 2024
1 parent c157d14 commit e0e0e85
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
50 changes: 50 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build

on:
merge_group:
pull_request:
push:

env:
CARGO_TERM_COLOR: always

jobs:
build_regular:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
#- name: Install dependencies
# run: apt update && apt install ->
- name: check format
run: make fmt_check
- name: build
run: make -j $(nproc)
- name: test
timeout-minutes: 1
run: echo "cat tests/testfile_65kb.txt | cat | wc -l" | ./phipsshell

build_nix_shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@V27
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: check format
run: nix develop --command bash -c "make fmt_check"
- name: build
run: nix develop --command bash -c "make -j $(nproc)"
- name: test
timeout-minutes: 1
run: nix develop --command bash -c 'echo "cat tests/testfile_65kb.txt | cat | wc -l" | ./phipsshell | grep -q 651'

build_nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@V27
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: nix build
run: nix build .
- name: nix test
timeout-minutes: 1
run: echo "cat tests/testfile_65kb.txt | cat | wc -l" | nix run . | grep -q 651
10 changes: 10 additions & 0 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: QA
on: [ merge_group, push, pull_request ]
jobs:
spellcheck:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Executes "typos ."
- uses: crate-ci/[email protected]
2 changes: 0 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ static void sig_handler(int sig) {
if (sig == SIGINT) {
// Interrupt from keyboard; Ctrl+C
// don't stop our shell with an error (default behaviour)
// TODO I don't know why this check is necessary, because SIGINT stands
// already in signal() function call..
printf("\n"); // Move to a new line
rl_on_new_line(); // Regenerate the prompt on a newline
rl_replace_line("", 0); // Clear the previous text
Expand Down

0 comments on commit e0e0e85

Please sign in to comment.