Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 11 additions & 38 deletions .github/workflows/angry_birds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,24 @@ on:
branches: [main, develop]
paths:
- 'examples/angry_birds/**'
- '!examples/angry_birds/**/*.md'
- '.github/workflows/example_reusable.yml'
- '.github/workflows/angry_birds.yml'
pull_request:
branches: [main, develop]
paths:
- 'examples/angry_birds/**'
- '!examples/angry_birds/**/*.md'
- '.github/workflows/example_reusable.yml'
- '.github/workflows/angry_birds.yml'

env:
CARGO_TERM_COLOR: always
concurrency:
group: angry-birds-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: CI
runs-on: macos-latest
defaults:
run:
working-directory: examples/angry_birds
steps:
- uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32v1-none
components: rustfmt, clippy

- name: Cache dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: examples/angry_birds

- name: Check formatting
run: cargo fmt --check

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build
run: cargo build

- name: Test
run: cargo test

- name: Install Stellar CLI
run: brew install stellar-cli

- name: Stellar contract build
run: stellar contract build
uses: ./.github/workflows/example_reusable.yml
with:
job_name: Angry Birds CI
working_directory: examples/angry_birds
49 changes: 11 additions & 38 deletions .github/workflows/arkanoid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,24 @@ on:
branches: [main, develop]
paths:
- 'examples/arkanoid/**'
- '!examples/arkanoid/**/*.md'
- '.github/workflows/example_reusable.yml'
- '.github/workflows/arkanoid.yml'
pull_request:
branches: [main, develop]
paths:
- 'examples/arkanoid/**'
- '!examples/arkanoid/**/*.md'
- '.github/workflows/example_reusable.yml'
- '.github/workflows/arkanoid.yml'

env:
CARGO_TERM_COLOR: always
concurrency:
group: arkanoid-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: CI
runs-on: macos-latest
defaults:
run:
working-directory: examples/arkanoid
steps:
- uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32v1-none
components: rustfmt, clippy

- name: Cache dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: examples/arkanoid

- name: Check formatting
run: cargo fmt --check

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build
run: cargo build

- name: Test
run: cargo test

- name: Install Stellar CLI
run: brew install stellar-cli

- name: Stellar contract build
run: stellar contract build
uses: ./.github/workflows/example_reusable.yml
with:
job_name: Arkanoid CI
working_directory: examples/arkanoid
49 changes: 11 additions & 38 deletions .github/workflows/asteroids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,24 @@ on:
branches: [main, develop]
paths:
- 'examples/asteroids/**'
- '!examples/asteroids/**/*.md'
- '.github/workflows/example_reusable.yml'
- '.github/workflows/asteroids.yml'
pull_request:
branches: [main, develop]
paths:
- 'examples/asteroids/**'
- '!examples/asteroids/**/*.md'
- '.github/workflows/example_reusable.yml'
- '.github/workflows/asteroids.yml'

env:
CARGO_TERM_COLOR: always
concurrency:
group: asteroids-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: CI
runs-on: macos-latest
defaults:
run:
working-directory: examples/asteroids
steps:
- uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32v1-none
components: rustfmt, clippy

- name: Cache dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: examples/asteroids

- name: Check formatting
run: cargo fmt --check

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build
run: cargo build

- name: Test
run: cargo test

- name: Install Stellar CLI
run: brew install stellar-cli

- name: Stellar contract build
run: stellar contract build
uses: ./.github/workflows/example_reusable.yml
with:
job_name: Asteroids CI
working_directory: examples/asteroids
49 changes: 11 additions & 38 deletions .github/workflows/bomberman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,24 @@ on:
branches: [main, develop]
paths:
- 'examples/bomberman/**'
- '!examples/bomberman/**/*.md'
- '.github/workflows/example_reusable.yml'
- '.github/workflows/bomberman.yml'
pull_request:
branches: [main, develop]
paths:
- 'examples/bomberman/**'
- '!examples/bomberman/**/*.md'
- '.github/workflows/example_reusable.yml'
- '.github/workflows/bomberman.yml'

env:
CARGO_TERM_COLOR: always
concurrency:
group: bomberman-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: CI
runs-on: macos-latest
defaults:
run:
working-directory: examples/bomberman
steps:
- uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32v1-none
components: rustfmt, clippy

- name: Cache dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: examples/bomberman

- name: Check formatting
run: cargo fmt --check

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build
run: cargo build

- name: Test
run: cargo test

- name: Install Stellar CLI
run: brew install stellar-cli

- name: Stellar contract build
run: stellar contract build
uses: ./.github/workflows/example_reusable.yml
with:
job_name: Bomberman CI
working_directory: examples/bomberman
7 changes: 7 additions & 0 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/core.yml'
- '!.github/**/*.md'
pull_request:
branches: [main, develop]
paths:
Expand All @@ -19,14 +20,20 @@ on:
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/core.yml'
- '!.github/**/*.md'

env:
CARGO_TERM_COLOR: always

concurrency:
group: core-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
core:
name: Library Validation
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4

Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/example_reusable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Example Reusable CI

on:
workflow_call:
inputs:
job_name:
required: true
type: string
working_directory:
required: true
type: string
runs_on:
required: false
type: string
default: macos-latest
build_stellar_contract:
required: false
type: boolean
default: true

env:
CARGO_TERM_COLOR: always

jobs:
ci:
name: ${{ inputs.job_name }}
runs-on: ${{ inputs.runs_on }}
timeout-minutes: 20
defaults:
run:
working-directory: ${{ inputs.working_directory }}
steps:
- uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32v1-none
components: rustfmt, clippy

- name: Cache dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ inputs.working_directory }}

- name: Check formatting
run: cargo fmt --check

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build
run: cargo build

- name: Test
run: cargo test

- name: Install Stellar CLI
if: ${{ inputs.build_stellar_contract }}
run: brew install stellar-cli

- name: Stellar contract build
if: ${{ inputs.build_stellar_contract }}
run: stellar contract build
Loading
Loading