Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ueco-jb committed Jun 25, 2024
0 parents commit c9cadac
Show file tree
Hide file tree
Showing 22 changed files with 3,443 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
on: [pull_request]

name: Basic

jobs:
build:
name: Build binaries
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: [1.78.0]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust-version }}
target: wasm32-unknown-unknown
override: true
- name: Build
run: make build

test:
needs: build
name: Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: [1.78.0]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust-version }}
target: wasm32-unknown-unknown
override: true
- name: Run tests
run: make test

lints:
needs: build
name: Lints
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: [1.78.0]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust-version }}
override: true
target: wasm32-unknown-unknown
components: rustfmt, clippy
- name: Run lints
run: make lints
42 changes: 42 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
push:
branches:
- main

name: Code coverage check

jobs:

coverage:
name: Code Coverage
# https://github.com/actions/virtual-environments
runs-on: ubuntu-20.04
strategy:
matrix:
rust-version: [1.78.0]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust-version }}
target: wasm32-unknown-unknown
override: true
- name: Install tarpaulin
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-tarpaulin --version 0.30.0
- run: make build
- name: Run code coverage check with tarpaulin
uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: --all-features --workspace --timeout 120 --out Xml --exclude soroban-token-contract
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./cobertura.xml
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release Artifacts
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. 1.0, 20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. 1.0-rc1, 20.15.10-rc5

jobs:
release-artifacts:
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: [1.78.0]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust-version }}
target: wasm32-unknown-unknown
override: true
- name: Build artifacts
run: make build
- name: Generate checksums
run: |
cd target/wasm32-unknown-unknown/release/
sha256sum *.wasm > checksums.txt
- name: Release
env:
GH_TOKEN: ${{ secrets.JAKUB_SECRET_CI }}
run: >-
gh release create ${{ github.ref_name }}
target/wasm32-unknown-unknown/release/*.wasm
target/wasm32-unknown-unknown/release/checksums.txt
--generate-notes
--title "${{ github.ref_name }}"
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# macOS
.DS_Store

# Text file backups
**/*.rs.bk

# Build results
target/

# IDEs
.vscode/
.idea/
*.iml

# Auto-gen
.cargo-ok
/artifacts/

cobertura.xml

**/test_snapshots
Loading

0 comments on commit c9cadac

Please sign in to comment.