.github/workflows/... building

This commit is contained in:
randymcmillan 2023-07-23 12:44:52 -04:00
parent a39f1bca95
commit f202ebcdde
No known key found for this signature in database
GPG Key ID: 85495A938B7F78DF
6 changed files with 43 additions and 14 deletions

View File

@ -28,14 +28,23 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: styfle/cancel-workflow-action@0.11.0 - uses: styfle/cancel-workflow-action@0.11.0
if: ${{ !env.ACT }}
with: with:
access_token: ${{ github.token }} access_token: ${{ github.token }}
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: printenv with:
fetch-depth: '0'
submodules: 'recursive'
set-safe-directory: 'true'
- name: printenv && sudo apt update && sudo apt install scdoc -y
run: | run: |
printenv printenv && sudo apt update && sudo apt install scdoc -y
- name: rm -rf deps
run: |
rm -rf deps
- name: make - name: make
run: | run: |
mkdir -p /usr/local/share/man/man1/nostril.1
make make
- name: sudo make install - name: sudo make install
run: | run: |
@ -43,7 +52,8 @@ jobs:
- name: man nostril - name: man nostril
run: | run: |
man nostril man nostril
- name: sudo -su runner nostril - name: sudo ./nostril
run: | run: |
#pipe handles non-zero return from nostril default help #pipe handles non-zero return from nostril default help
sudo -su runner nostril | echo "${PIPESTATUS[0]}" file nostril
sudo ./nostril >/dev/null | echo "${PIPESTATUS[0]}"

View File

@ -18,15 +18,21 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: styfle/cancel-workflow-action@0.11.0 - uses: styfle/cancel-workflow-action@0.11.0
if: ${{ !env.ACT }}
with: with:
access_token: ${{ github.token }} access_token: ${{ github.token }}
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: "printenv" with:
fetch-depth: '0'
submodules: 'recursive'
set-safe-directory: 'true'
- name: printenv && sudo apt update && sudo apt install scdoc -y
run: | run: |
printenv printenv && sudo apt update && sudo apt install scdoc -y
- name: "Build pre-release" - name: "Build pre-release"
run: | run: |
make mkdir -p /usr/local/share/man/man1/nostril.1
make nostril
mv nostril nostril-$RUNNER_OS-$RUNNER_ARCH mv nostril nostril-$RUNNER_OS-$RUNNER_ARCH
shasum -a 256 nostril-$RUNNER_OS-$RUNNER_ARCH > nostril-$RUNNER_OS-$RUNNER_ARCH.sha256.txt shasum -a 256 nostril-$RUNNER_OS-$RUNNER_ARCH > nostril-$RUNNER_OS-$RUNNER_ARCH.sha256.txt
mv nostril-query nostril-query-$RUNNER_OS-$RUNNER_ARCH mv nostril-query nostril-query-$RUNNER_OS-$RUNNER_ARCH
@ -37,6 +43,7 @@ jobs:
- name: Set output - name: Set output
run: echo "{name}={value}" >> $GITHUB_OUTPUT run: echo "{name}={value}" >> $GITHUB_OUTPUT
- uses: "marvinpinto/action-automatic-releases@latest" - uses: "marvinpinto/action-automatic-releases@latest"
if: ${{ !env.ACT }}
with: with:
repo_token: "${{ secrets.GITHUB_TOKEN }}" repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ matrix.os }} automatic_release_tag: ${{ matrix.os }}

View File

@ -18,15 +18,21 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: styfle/cancel-workflow-action@0.11.0 - uses: styfle/cancel-workflow-action@0.11.0
if: ${{ !env.ACT }}
with: with:
access_token: ${{ github.token }} access_token: ${{ github.token }}
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: "printenv" with:
fetch-depth: '0'
submodules: 'recursive'
set-safe-directory: 'true'
- name: printenv && sudo apt update && sudo apt install scdoc -y
run: | run: |
printenv printenv && sudo apt update && sudo apt install scdoc -y
- name: "Build release" - name: "Build release"
run: | run: |
make mkdir -p /usr/local/share/man/man1/nostril.1
make nostril
mv nostril nostril-$RUNNER_OS-$RUNNER_ARCH mv nostril nostril-$RUNNER_OS-$RUNNER_ARCH
shasum -a 256 nostril-$RUNNER_OS-$RUNNER_ARCH > nostril-$RUNNER_OS-$RUNNER_ARCH.sha256.txt shasum -a 256 nostril-$RUNNER_OS-$RUNNER_ARCH > nostril-$RUNNER_OS-$RUNNER_ARCH.sha256.txt
mv nostril-query nostril-query-$RUNNER_OS-$RUNNER_ARCH mv nostril-query nostril-query-$RUNNER_OS-$RUNNER_ARCH
@ -37,6 +43,7 @@ jobs:
- name: Set output - name: Set output
run: echo "{name}={value}" >> $GITHUB_OUTPUT run: echo "{name}={value}" >> $GITHUB_OUTPUT
- uses: "marvinpinto/action-automatic-releases@latest" - uses: "marvinpinto/action-automatic-releases@latest"
if: ${{ !env.ACT }}
with: with:
repo_token: "${{ secrets.GITHUB_TOKEN }}" repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ matrix.os }} automatic_release_tag: ${{ matrix.os }}

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "deps/secp256k1"] [submodule "deps/secp256k1"]
path = deps/secp256k1 path = deps/secp256k1
url = https://github.com/bitcoin-core/secp256k1 url = https://github.com/bitcoin-core/secp256k1
ignore = dirty
branch = master
depth = shallow

View File

@ -46,6 +46,8 @@ deps/secp256k1/include/secp256k1.h: deps/secp256k1/.git
deps/secp256k1/configure: deps/secp256k1/.git deps/secp256k1/configure: deps/secp256k1/.git
cd deps/secp256k1; \ cd deps/secp256k1; \
automake --add-missing; \
autoreconf; \
./autogen.sh ./autogen.sh
deps/secp256k1/config.log: deps/secp256k1/configure deps/secp256k1/config.log: deps/secp256k1/configure

View File

@ -97,7 +97,7 @@ void usage()
printf(" -e <event_id> shorthand for --tag e <event_id>\n"); printf(" -e <event_id> shorthand for --tag e <event_id>\n");
printf(" -p <pubkey> shorthand for --tag p <pubkey>\n"); printf(" -p <pubkey> shorthand for --tag p <pubkey>\n");
printf(" -t <hashtag> shorthand for --tag t <hashtag>\n"); printf(" -t <hashtag> shorthand for --tag t <hashtag>\n");
exit(1); exit(0);
} }