Skip to content

Commit

Permalink
Merge branch 'fix-tpu-v2-wait-for-payment-spend' into fix-tpu-v2-wait…
Browse files Browse the repository at this point in the history
…-for-payment-spend-kickstart
  • Loading branch information
laruh committed Dec 26, 2024
2 parents c214726 + 41f20f9 commit 3c625be
Show file tree
Hide file tree
Showing 32 changed files with 292 additions and 144 deletions.
11 changes: 6 additions & 5 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM docker.io/debian:10

MAINTAINER Onur Özkan <[email protected]>
LABEL authors="Onur Özkan <[email protected]>"

RUN apt-get update -y

Expand All @@ -11,6 +11,7 @@ RUN apt-get install -y \
curl \
wget \
unzip \
libudev-dev \
gnupg

RUN ln -s /usr/bin/python3 /bin/python
Expand Down Expand Up @@ -49,8 +50,8 @@ RUN apt-get install -y \
docker-buildx-plugin

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal --default-toolchain nightly-2023-06-01 -y

RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-linux-x86_64.zip
RUN unzip protoc-3.20.1-linux-x86_64.zip && mv ./include/google /usr/include/google

ENV PATH="/root/.cargo/bin:$PATH"
RUN cargo install wasm-pack --version 0.10.3
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-linux-x86_64.zip
RUN unzip protoc-25.3-linux-x86_64.zip && mv ./include/google /usr/include/google

10 changes: 10 additions & 0 deletions .github/actions/build-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: 'Set up build cache'
description: 'Sets up caching for KDF builds'
runs:
using: 'composite'
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up rust-cache
uses: Swatinem/rust-cache@v2
20 changes: 0 additions & 20 deletions .github/actions/cargo-cache/action.yml

This file was deleted.

38 changes: 19 additions & 19 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -119,8 +119,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -180,8 +180,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -240,8 +240,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $Env:GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -303,8 +303,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -368,7 +368,7 @@ jobs:
rustup target add wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | bash -s -- -y
run: CARGO_HOME=/root/.cargo cargo install wasm-pack --version 0.10.3

- name: Calculate commit hash for PR commit
if: github.event_name == 'pull_request'
Expand All @@ -378,8 +378,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -430,8 +430,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -505,8 +505,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -582,8 +582,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/fmt-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
with:
deps: ('protoc' 'libudev-dev')

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: fmt check
# Format checks aren't OS dependant.
Expand All @@ -54,8 +54,8 @@ jobs:
with:
deps: ('protoc')

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: clippy lint
run: cargo clippy --target wasm32-unknown-unknown -- --D warnings
6 changes: 4 additions & 2 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ jobs:
- name: Check PR labels
env:
LABEL_NAMES: ${{ toJson(github.event.pull_request.labels.*.name) }}
if: contains(env.LABEL_NAMES, 'under review') == contains(env.LABEL_NAMES, 'in progress')
if: "!((contains(env.LABEL_NAMES, 'pending review') && !contains(env.LABEL_NAMES, 'in progress') && !contains(env.LABEL_NAMES, 'blocked'))
|| (!contains(env.LABEL_NAMES, 'pending review') && contains(env.LABEL_NAMES, 'in progress') && !contains(env.LABEL_NAMES, 'blocked'))
|| (!contains(env.LABEL_NAMES, 'pending review') && !contains(env.LABEL_NAMES, 'in progress') && contains(env.LABEL_NAMES, 'blocked')))"
run: |
echo "PR must have "exactly one" of these labels: ['under review', 'in progress']."
echo "PR must have "exactly one" of these labels: ['status: pending review', 'status: in progress', 'status: blocked']."
exit 1
38 changes: 19 additions & 19 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -110,8 +110,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -165,8 +165,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -219,8 +219,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $Env:GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -275,8 +275,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -334,7 +334,7 @@ jobs:
rustup target add wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | bash -s -- -y
run: CARGO_HOME=/root/.cargo cargo install wasm-pack --version 0.10.3

- name: Calculate commit hash for PR commit
if: github.event_name == 'pull_request'
Expand All @@ -344,8 +344,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -393,8 +393,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -462,8 +462,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down Expand Up @@ -533,8 +533,8 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache
- name: Build cache
uses: ./.github/actions/build-cache

- name: Build
run: |
Expand Down
Loading

0 comments on commit 3c625be

Please sign in to comment.