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

View File

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

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "deps/secp256k1"]
path = deps/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
cd deps/secp256k1; \
automake --add-missing; \
autoreconf; \
./autogen.sh
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(" -p <pubkey> shorthand for --tag p <pubkey>\n");
printf(" -t <hashtag> shorthand for --tag t <hashtag>\n");
exit(1);
exit(0);
}