This commit is contained in:
@RandyMcMillan 2023-09-03 16:27:49 -06:00 committed by GitHub
commit 9893adb70c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 188 additions and 20 deletions

View File

@ -1,17 +0,0 @@
name: C/C++ CI
on:
push:
branches: [ "master", "**" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: make
run: make

50
.github/workflows/macos-matrix.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: macos-matrix
# Controls when the action will run.
on:
pull_request:
branches:
- '*'
- '*/*'
- '**'
- 'master'
- 'main'
push:
branches:
- '*'
- '*/*'
- '**'
- 'master'
- 'main'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
macos-build_and_test:
strategy:
matrix:
os: [macos-latest, macos-11, macos-12]
runs-on: ${{ matrix.os }}
steps:
- uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: printenv
run: |
brew install libtool autoconf automake
printenv
- name: make
run: |
make
- name: sudo make install
run: |
sudo make install
- name: man nostril
run: |
man nostril
- name: sudo -su runner nostril
run: |
#pipe handles non-zero return from nostril default help
sudo -su runner nostril | echo "${PIPESTATUS[0]}"

42
.github/workflows/macos-pre-release.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: macos-pre-release
# Controls when the action will run.
on:
push:
branches:
- 'master'
- '**-pre-release'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
pre-release:
strategy:
matrix:
os: [macos-11, macos-12, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: "build pre-release"
run: |
brew install libtool autoconf automake
printenv
make
shasum -a 256 nostril > nostril.sha256.txt
- name: Save state
run: echo "{name}={value}" >> $GITHUB_STATE
- name: Set output
run: echo "{name}={value}" >> $GITHUB_OUTPUT
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ matrix.os }}
prerelease: true
title: "Development Build"
files: |
nostril
nostril.sha256.txt

49
.github/workflows/ubuntu-matrix.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: ubuntu-matrix
# Controls when the action will run.
on:
pull_request:
branches:
- '*'
- '*/*'
- '**'
- 'master'
- 'main'
push:
branches:
- '*'
- '*/*'
- '**'
- 'master'
- 'main'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
ubuntu-build_and_test:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: printenv
run: |
printenv
- name: make
run: |
make
- name: sudo make install
run: |
sudo make install
- name: man nostril
run: |
man nostril
- name: sudo -su runner nostril
run: |
#pipe handles non-zero return from nostril default help
sudo -su runner nostril | echo "${PIPESTATUS[0]}"

View File

@ -0,0 +1,40 @@
name: ubuntu-pre-release
# Controls when the action will run.
on:
push:
branches:
- 'master'
- '**-pre-release'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
pre-release:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: "build pre-release"
run: |
make
shasum -a 256 nostril > nostril.sha256.txt
- name: Save state
run: echo "{name}={value}" >> $GITHUB_STATE
- name: Set output
run: echo "{name}={value}" >> $GITHUB_OUTPUT
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ matrix.os }}
prerelease: true
title: "Development Build"
files: |
nostril
nostril.sha256.txt

3
.gitignore vendored
View File

@ -21,3 +21,6 @@ scripts/nostr-req
scripts/subnote
/dist
/version
.DS_Store
deps/.DS_Store

View File

@ -55,9 +55,10 @@ nostril: $(HEADERS) $(OBJS) $(ARS)
$(CC) $(CFLAGS) $(OBJS) $(ARS) -o $@
install: all
install -Dm644 doc/nostril.1 $(PREFIX)/share/man/man1/nostril.1
install -Dm755 nostril $(PREFIX)/bin/nostril
install -Dm755 nostril-query $(PREFIX)/bin/nostril-query
mkdir -p $(PREFIX)/bin
install -m644 doc/nostril.1 $(PREFIX)/share/man/man1/nostril.1
install -m755 nostril $(PREFIX)/bin/nostril
install -m755 nostril-query $(PREFIX)/bin/nostril-query
config.h: configurator
./configurator > $@