Why Nostr? What is Njump?
2024-07-03 00:48:51

npub1c3…f40qp on Nostr: commit 6400969bb191c71d76023c730ec8a3c85f9d2557 Author: randymcmillan ...

commit 6400969bb191c71d76023c730ec8a3c85f9d2557
Author: randymcmillan <[email protected]>
Date: Wed Jun 26 14:40:01 2024 -0400

.github/workflows/gnostr-bot.yml:intermediate

diff --git a/.github/workflows/gnostr-bot.yml b/.github/workflows/gnostr-bot.yml
index 99ff720b7..dd7a14acb 100644
--- a/.github/workflows/gnostr-bot.yml
+++ b/.github/workflows/gnostr-bot.yml
@@ -1,4 +1,4 @@
-name: gnostr-bot
+name: gnostr

# Controls when the action will run.
on:
@@ -18,29 +18,28 @@ on:
- '**'
- 'master'
- 'main'
- tags:
- - '**[0-9]+.[0-9]+.[0-9]+*'
- - '**test**'
- - '**-rc**'
- workflow_dispatch:
-
-permissions:
- contents: write

-env:
- GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
+ workflow_dispatch:

+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
+ env:
+ GNOSTR: "gnostr"
+ FORCE: "--force"
+ GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
strategy:
- fail-fast: false
matrix:
- os: ["ubuntu-latest"]
- tag: ["latest"]
+ os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
- container: rust:${{ matrix.tag }}
-
steps:
+ - name: echo test
+ #if: ${{ !env.ACT }}
+ run: |
+ echo GNOSTR=${{ env.GNOSTR }}
+ echo GNOSTR1=${{ env.GNOSTR1 }}
+ env:
+ GNOSTR1: "GNOSTR1"
- uses: styfle/[email protected]
if: ${{ !env.ACT }}
with:
@@ -73,35 +72,59 @@ jobs:
target
key: ${{ runner.os }}-target

- - run: git config --global --add safe.directory /__w/gnostr/gnostr || true
- - run: printenv
- - run: apt-get update && apt-get install apt -y
- - run: apt-get install cmake make sudo -y #&& cmake -S .
- - run: apt-get install golang-1.19-go golang-1.19-src golang-go golang-src
- - run: apt-get install -y cargo-doc clang-14-doc wasi-libc cmake-doc cmake-format elpa-cmake-mode ninja-build autopoint gettext-doc libasprintf-dev libgettextpo-dev lrzip llvm-14-doc python3-setuptools python-pygments-doc
- - run: apt-get install -y lib32stdc++6 libc6-i386 lib32gcc-s1 ttf-bitstream-vera lld-14 || true
- - run: apt-get install binfmt-support cargo clang clang-14 cmake cmake-data gettext gettext-base libarchive13 libclang-common-14-dev libclang-cpp14 libclang-rt-14-dev libclang1-14 libcurl3-nss libgc1 libgit2-1.5 libhttp-parser2.9 libjsoncpp25 libllvm14 libmbedcrypto7 libmbedtls14 libmbedx509-1 libnspr4 libnss3 libobjc-12-dev libobjc4 libpfm4 libpipeline1 librhash0 libstd-rust-1.63 libstd-rust-dev libuv1 libz3-4 libz3-dev llvm-14 llvm-14-dev llvm-14-linker-tools llvm-14-runtime llvm-14-tools nss-plugin-pem python-is-python3 python3-pkg-resources python3-pygments python3-yaml rustc sudo -y
- - run: cargo install --force gnostr-sha256
- - run: cargo install --force gnostr-bins
- ## NOTE: make gnostr-am is the non-cmake build
- - run: make gnostr && echo $(which gnostr)
- - run: make gnostr gnostr-install && echo $(which gnostr)
- - run: gnostr-nip --sec $(gnostr-sha256) | gnostr-post-event
- if: github.event_name == 'pull_request'
- - run: gnostr-nip --sec $(gnostr-sha256 $(gnostr-weeble)) | gnostr-post-event
- if: github.event_name == 'pull_request'
- - run: gnostr-nip --sec $(gnostr-sha256 $(gnostr-weeble)$(gnostr-blockheight)) | gnostr-post-event
- if: github.event_name == 'pull_request'
+ - uses: actions/checkout@v3
+ if: ${{ !env.ACT }}
+ with:
+ submodules: 'true'
+ set-safe-directory: 'true'
+ fetch-depth: '0'
+ fetch-tags: false
+
+ ## objective: streamline gnostr installation on macos/brewlinux
+ - run: brew tap gnostr-org/homebrew-gnostr-org || true
+ if: github.event_name == 'pull_request' && matrix.os == 'macos-latest'
+
+ ## objective: streamline gnostr installation on macos/brewlinux
+ - run: brew tap nostorg/nostr || true
+ if: github.event_name == 'pull_request' && matrix.os == 'macos-latest'
+
+ - run: rustup default stable
+ if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
+ - run: cargo search gnostr --limit 100
+ if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
+ - run: mkdir -p ~/bin
+ if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
+
+ #- run: for t in */Cargo.toml;do echo $t;cargo b -r -vv --manifest-path $t ;done
+ ## objective: ensure make detect installs all needed depends/libs/etc
+ ## make detect is first for brew install sequence OR sudo make detect for apt install
+ - run: make detect || sudo make detect
+ if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
+ - run: pipx install virtualenv || true
+ if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
+
+ ## objective: test non-cmake build gnostr-am
+ - run: make gnostr gnostr-am gnostr-install
+ #if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
+ - run: make gnostr-bins
+ #if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
- run: gnostr-am --sec $(gnostr-sha256 $(gnostr-weeble)) --content $(gnostr-weeble)/$(gnostr-blockheight)/$(gnostr-wobble) -t gnostr --tag weeble $(gnostr-weeble) --tag blockheight $(gnostr-blockheight) --tag wobble $(gnostr-wobble)
- if: github.event_name == 'pull_request'
+ #if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
+ ## objective: test cmake build gnostr
+ ## objective: test cargo build/install gnostr-bins
+ - run: cmake .
+ #if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
+ - run: V=1 make gnostr bins xq cargo-br cargo-i
+ #if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
+ - run: V=1 make gnostr-install
+ #if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
+ - run: V=1 make gnostr-verify-keypair
+ #if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'
+ - run: which gnostr
+ #if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'

- - run: echo $(date +%s)
- - run: ls -a
- - run: $(which gnostr-am) --sec $(gnostr-sha256 $(gnostr-weeble)) -t gnostr --tag weeble $(gnostr-weeble) --tag wobble $(gnostr-wobble) --tag blockheight $(gnostr-blockheight) --content "$(gnostr-weeble)/$(gnostr-blockheight)/$(gnostr-wobble)" | gnostr-post-event wss://relay.damus.io
- - run: $(which gnostr-am) --sec $(gnostr-sha256 $(gnostr-weeble)$(gnostr-blockheight)) -t gnostr --tag weeble $(gnostr-weeble) --tag wobble $(gnostr-wobble) --tag blockheight $(gnostr-blockheight) --content "$(gnostr-weeble)/$(gnostr-blockheight)/$(gnostr-wobble)" | gnostr-post-event wss://relay.damus.io
- - run: gnostr-nip --sec $(gnostr-sha256) | gnostr-post-event
- - run: gnostr-nip --sec $(gnostr-sha256 $(gnostr-weeble)) | gnostr-post-event
- - run: gnostr-nip --sec $(gnostr-sha256 $(gnostr-weeble)$(gnostr-blockheight)) | gnostr-post-event
+ #- run: V=1 sudo make cat doc || true
+ # if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix'

- name: Save rustup
id: cache-rustup-save
Author Public Key
npub1c3mhpsrr3lgdq42d0dyv6l3dtlksz90xm5v8celz3fh9tz8x49hs2f40qp