mirror of
https://github.com/fluencelabs/registry.git
synced 2025-04-25 02:02:14 +00:00
Download marine with curl (#13)
This commit is contained in:
parent
26dd30744c
commit
ea5d350f59
@ -12,6 +12,8 @@ jobs:
|
|||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
- run: |
|
||||||
|
sudo bash .github/download_marine.sh
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- aqua-dht04-{{ checksum "Cargo.lock" }}
|
- aqua-dht04-{{ checksum "Cargo.lock" }}
|
||||||
@ -19,7 +21,6 @@ jobs:
|
|||||||
rustup toolchain install nightly-2021-04-24-x86_64-unknown-linux-gnu
|
rustup toolchain install nightly-2021-04-24-x86_64-unknown-linux-gnu
|
||||||
rustup default nightly-2021-04-24-x86_64-unknown-linux-gnu
|
rustup default nightly-2021-04-24-x86_64-unknown-linux-gnu
|
||||||
rustup target add wasm32-wasi --toolchain nightly-2021-04-24-x86_64-unknown-linux-gnu
|
rustup target add wasm32-wasi --toolchain nightly-2021-04-24-x86_64-unknown-linux-gnu
|
||||||
cargo install marine
|
|
||||||
./build.sh
|
./build.sh
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
# Must be an absolute path, or relative path from working_directory.
|
# Must be an absolute path, or relative path from working_directory.
|
||||||
|
14
.github/download_marine.sh
vendored
Executable file
14
.github/download_marine.sh
vendored
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -o pipefail -o errexit -o nounset
|
||||||
|
set -x
|
||||||
|
|
||||||
|
MARINE_RELEASE="https://api.github.com/repos/fluencelabs/marine/releases/latest"
|
||||||
|
OUT_DIR=/usr/local/bin
|
||||||
|
|
||||||
|
# get metadata about release
|
||||||
|
curl -s -H "Accept: application/vnd.github.v3+json" $MARINE_RELEASE |
|
||||||
|
# extract url and name for asset with name "marine"
|
||||||
|
# also append $OUT_DIR to each name so file is saved to $OUT_DIR
|
||||||
|
jq -r ".assets | .[] | select(.name == \"marine\") | \"\(.browser_download_url) $OUT_DIR/\(.name)\"" |
|
||||||
|
# download assets
|
||||||
|
xargs -n2 bash -c 'curl -L $0 -o $1 && chmod +x $1'
|
33
.github/workflows/release.yml
vendored
33
.github/workflows/release.yml
vendored
@ -19,6 +19,23 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Download jq
|
||||||
|
run: |
|
||||||
|
curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 -o /usr/local/bin/jq
|
||||||
|
chmod +x /usr/local/bin/jq
|
||||||
|
|
||||||
|
- name: Download marine
|
||||||
|
run: bash $GITHUB_WORKSPACE/.github/download_marine.sh
|
||||||
|
|
||||||
|
- name: Cache cargo
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
~/.cargo/bin
|
||||||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: Cache npm
|
- name: Cache npm
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -32,17 +49,21 @@ jobs:
|
|||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
|
|
||||||
- name: Build .aqua file
|
- name: Install Rust
|
||||||
working-directory: .
|
|
||||||
run: |
|
run: |
|
||||||
rustup toolchain install nightly-2021-04-24-x86_64-unknown-linux-gnu
|
rustup toolchain install nightly-2021-04-24-x86_64-unknown-linux-gnu
|
||||||
rustup default nightly-2021-04-24-x86_64-unknown-linux-gnu
|
rustup default nightly-2021-04-24-x86_64-unknown-linux-gnu
|
||||||
rustup target add wasm32-wasi --toolchain nightly-2021-04-24-x86_64-unknown-linux-gnu
|
rustup target add wasm32-wasi --toolchain nightly-2021-04-24-x86_64-unknown-linux-gnu
|
||||||
cargo install marine
|
|
||||||
./build.sh
|
|
||||||
cp ./aqua/aqua-dht.aqua ./npm/dht.aqua
|
|
||||||
|
|
||||||
### Calculate FINAL_VERSION
|
- name: Build aqua-dht.wasm
|
||||||
|
working-directory: .
|
||||||
|
run: ./build.sh
|
||||||
|
|
||||||
|
- name: Build .aqua file
|
||||||
|
run: |
|
||||||
|
cp $GITHUB_WORKSPACE/aqua/aqua-dht.aqua $GITHUB_WORKSPACE/npm/dht.aqua
|
||||||
|
|
||||||
|
## Calculate FINAL_VERSION
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
|
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
|
||||||
|
Loading…
x
Reference in New Issue
Block a user