Skip to content

Commit

Permalink
Merge pull request #1 from Bitc0indad/update-to-v.0.0.17
Browse files Browse the repository at this point in the history
Update to v.0.0.17
  • Loading branch information
RandyMcMillan authored Jan 25, 2024
2 parents ea840ed + 6f1162b commit a794363
Show file tree
Hide file tree
Showing 290 changed files with 51,208 additions and 8,293 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/gnostr-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,24 @@ jobs:
steps:
## notice: this is a pre checkout step
## notice: additional operations can be done prior to checkout
- run: apk update && apk add bash cmake git python3 && python3 -m ensurepip
- run: apk update && apk add bash cmake curl git make python3 && python3 -m ensurepip
- run: printenv
- run: touch ~/GITHUB_TOKEN.txt
- name: checkout@v3 fetch-depth submodules set-safe-dir true
uses: actions/checkout@v3
with:
fetch-depth: '10'
submodules: 'true'
set-safe-directory: 'true'
## notice: these are post checkout steps
- run: apk update && apk add autoconf automake build-base openssl-dev libtool make
- run: touch ~/GITHUB_TOKEN.txt
- run: apk update && apk add autoconf automake build-base openssl-dev libtool make sudo
- run: rm CMakeCache.txt || echo && cmake .
- run: make
- run: make clean
- run: make help
- run: make libsecp256k1.a || rm -rf deps/secp256k1 && make libsecp256k1.a
- run: make gnostr || rm gnostr && make gnostr
- run: rm gnostr || true
- run: make gnostr && cp gnostr gnostr-alpine
- run: make gnostr-install
## TODO: add ssh config to act sequence
- run: rm -rf .venv
54 changes: 54 additions & 0 deletions .github/workflows/gnostr-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: gnostr-bot

on:
schedule:
- cron: '0 * * * *' # “At minute zero.”
pull_request:
branches:
- '*'
- '*/*'
- '**'
- 'master'
- 'main'
push:
branches:
- '*'
- '*/*'
- '**'
- 'master'
- 'main'

env:
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1

jobs:
build:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
tag: ["latest"]
runs-on: ${{ matrix.os }}
container: rust:${{ matrix.tag }}

steps:
- name: checkout@v3 fetch-depth submodules set-safe-dir true
uses: actions/checkout@v3
if: ${{ !env.ACT }}
with:
fetch-depth: '0'
submodules: 'true'
set-safe-directory: 'true'
- run: git config --global --add safe.directory /__w/gnostr/gnostr || true
- run: printenv
- run: apt-get update && apt-get install binfmt-support cargo clang clang-14 cmake cmake-data gettext gettext-base lib32gcc-s1 lib32stdc++6 libarchive13 libc6-i386 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 gnostr-sha256
- run: cargo install gnostr-bins
- run: rm -rf CMakeCache.txt
- run: rm -rf CMakeFiles
- run: cmake .
- run: V=1 make detect gnostr gnostr-install
- run: echo $(date +%s)
- run: DATE=$(date +%s) && gnostr --sec $(gnostr-sha256 $DATE) -t gnostr --tag weeble $(gnostr-weeble) --tag wobble $(gnostr-wobble) --content 'Somebody is developing with gnostr!' | gnostr-post-event wss://nos.lol
- run: DATE=$(date +%s) && gnostr --sec $(gnostr-sha256 $DATE) -t gnostr --tag weeble $(gnostr-weeble) --tag wobble $(gnostr-wobble) --content "WEEBLE:$(gnostr-weeble):BLOCKHEIGHT:$(gnostr-blockheight):WOBBLE:$(gnostr-wobble)" | gnostr-post-event wss://relay.damus.io

73 changes: 73 additions & 0 deletions .github/workflows/gnostr-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: gnostr-docker

on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
pull_request:
branches:
- '*'
- '*/*'
- '**'
- 'master'
- 'main'
push:
branches:
- '*'
- '*/*'
- '**'
- 'master'
- 'main'

env:
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1

jobs:
build:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
tag: ["latest", "slim-bullseye"]
runs-on: ${{ matrix.os }}
container: rust:${{ matrix.tag }}

steps:
- run: apt-get update && apt-get install autoconf build-essential curl cmake jq libexpat1-dev libcurl4-openssl-dev libssl-dev libtool lsb-release git make nodejs npm pkg-config python3 python-is-python3 sudo tcl zlib1g-dev -y
## notice: this is a pre checkout step
## notice: additional operations can be done prior to checkout
## - run: apk update && apk add bash cmake git python3 && python3 -m ensurepip
- run: printenv
- name: checkout@v3 fetch-depth submodules set-safe-dir true
uses: actions/checkout@v3
with:
fetch-depth: '100'
submodules: 'true'
set-safe-directory: 'true'
## notice: these are post checkout steps
## - run: apk update && apk add autoconf automake build-base openssl-dev libtool make
- run: touch ~/GITHUB_TOKEN.txt
- run: git config --global --add safe.directory /__w/gnostr/gnostr || true
- run: make detect
- run: ./build.cmake.sh
- run: cmake .
- run: make
- run: V=1 make gnostr bins gnostr-sha256 && gnostr --sec $(gnostr-sha256) --content 'gnostr' | gnostr-post-event wss://nos.lol
- run: make nvm
- run: make bins
- run: make tui
- run: make gnostr-act
- run: make gnostr-cat
- run: make gnostr-cli
- run: make gnostr-command
- run: make gnostr-git
- run: make gnostr-grep
- run: make gnostr-legit
- run: make gnostr-proxy
- run: make gnostr-sha256
- run: make libsecp256k1.a
- run: make gnostr-all
- run: make gnostr-install
- run: make all
- run: make install
- run: ls /usr/local/bin
- run: gnostr --sec $(gnostr-sha256) --content "$(gnostr-git show HEAD)" | gnostr-post-event wss://relay.damus.io
20 changes: 16 additions & 4 deletions .github/workflows/gnostr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
with:
submodules: 'true'
set-safe-directory: 'true'
fetch-depth: '10'

- uses: actions-rs/[email protected]
#if: ${{ !env.ACT }}
Expand All @@ -70,17 +71,28 @@ jobs:
run: |
echo $GNOSTR
- name: apt-get update || brew install virtualenv
- name: apt-get update && apt-get install jq || brew install jq || true
run: |
sudo apt-get update || brew install virtualenv
sudo apt-get update && apt-get install jq || brew install jq || true
touch ~/GITHUB_TOKEN.txt
- run: python3 -m pip install virtualenv

- run: V=1 make detect && cmake .
- run: V=1 make gnostr
- run: V=1 make gnostr-install
- run: V=1 make gnostr-all
- run: V=1 make gnostr bins gnostr-sha256 && gnostr --sec $(gnostr-sha256 $(gnostr-weeble)) --content '#gnostr!' -t gnostr --tag weeble $(gnostr-weeble) --tag wobble $(gnostr-wobble) --tag blockheight $(gnostr-blockheight) | gnostr-post-event wss://nos.lol
- run: gnostr --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) | gnostr-post-event wss://relay.damus.io

- name: V=1 make gnostr-all
run: V=1 make gnostr-all

- name: V=1 make gnostr-install
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
run: V=1 make gnostr-install

- name: ./build.cmake.sh
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
run: ./build.cmake.sh

- name: Save deps
id: cache-deps-save
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
steps:
- name: echo test
#if: ${{ !env.ACT }}
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
run: |
echo GNOSTR=${{ env.GNOSTR }}
echo GNOSTR1=${{ env.GNOSTR1 }}
Expand All @@ -58,6 +59,7 @@ jobs:
CMakeFiles/*.dir
$INPUT_PATH
~/.rustup
~/.cargo
CARGO_TARGET_DIR
key: ${{ runner.os }}-deps

Expand All @@ -69,7 +71,7 @@ jobs:
- uses: actions-rs/[email protected]
#if: ${{ !env.ACT }}
with:
toolchain: nightly
toolchain: stable
default: true
override: true

Expand All @@ -80,18 +82,22 @@ jobs:
touch ~/GITHUB_TOKEN.txt
- name: apt-get update || brew install virtualenv
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
run: |
sudo apt-get update && sudo apt-get install virtualenv || brew install virtualenv
touch ~/GITHUB_TOKEN.txt
- run: V=1 make detect
- run: python3 -m pip install virtualenv

- run: V=1 cmake .
- run: V=1 make gnostr
- run: V=1 make gnostr-all
- name: apt-get update || brew install virtualenv
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
run: |
V=1 make detect
python3 -m pip install virtualenv
V=1 cmake .
V=1 make gnostr
V=1 make gnostr-all
- name: "Build release"
- name: "Build pre-release"
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
run: |
mv gnostr gnostr-$RUNNER_OS-$RUNNER_ARCH
shasum -a 256 gnostr-$RUNNER_OS-$RUNNER_ARCH > gnostr-$RUNNER_OS-$RUNNER_ARCH.sha256.txt
Expand All @@ -102,7 +108,7 @@ jobs:
- name: Set output
run: echo "{name}={value}" >> $GITHUB_OUTPUT
- uses: "marvinpinto/action-automatic-releases@latest"
if: ${{ !env.ACT }}
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ matrix.os }}
Expand All @@ -115,12 +121,13 @@ jobs:
- name: Save deps
id: cache-deps-save
uses: actions/cache/save@v3
if: ${{ !env.ACT }}
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
with:
path: |
src/nostril
CMakeFiles/*.dir
$INPUT_PATH
~/.rustup
~/.cargo
CARGO_TARGET_DIR
key: ${{ steps.cache-deps-restore.outputs.cache-primary-key }}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ gnostr-cat
gnostr-cli
gnostr-client
gnostr-command
gnostr-configurator
gnostr-getrelays
gnostr-get-relays
gnostr-get-relays-c
gnostr-git
Expand Down Expand Up @@ -102,6 +104,7 @@ ext/secp256k1-0.3.2/examples/CTestTestfile.cmake

ext/wt-4.10.0/wt-config-version.cmake
ext/wt-4.10.0/wt-config.cmake
ext/wt-4.10.0/examples

ext/wxWidgets-3.2.2.1

Expand Down Expand Up @@ -170,3 +173,13 @@ web/wt_config.xml
web/APP_KEY
.gnostr/org
.gnostr/web

#gnostr-act:gnostr-alpine.tml
gnostr-alpine

# Added by cargo
#
# already existing elements were commented out

#/target
.gnostr/webview
Loading

0 comments on commit a794363

Please sign in to comment.