Skip to content

Commit

Permalink
revert yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
b-yap committed Apr 29, 2024
1 parent 677353e commit ebe7d97
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 38 deletions.
40 changes: 11 additions & 29 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ on:

name: continuous-integration-dev

env:
RUST_NIGHTLY_VERSION: nightly-2024-02-09

jobs:
ci:
strategy:
max-parallel: 1
matrix:
os: [ ubuntu-latest, macos-latest ]
rust: [stable, nightly]
include:
- os: ubuntu-latest
sccache-path: /home/runner/.cache/sccache
Expand Down Expand Up @@ -58,28 +54,9 @@ jobs:
brew install sccache
- name: Setup Rust toolchain
if: matrix.rust == 'stable'
# Call `rustup show` as a hack so that the toolchain defined in rust-toolchain.toml is installed
run: rustup show

- name: Remove rust-toolchain.toml for nightly
if: matrix.rust == 'nightly'
# To make sure that the nightly version will be used all throughout
run: |
rm /home/runner/work/spacewalk/spacewalk/rust-toolchain.toml
- name: Setup nightly Rust toolchain
if: matrix.rust == 'nightly'
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: $RUST_NIGHTLY_VERSION
components: rustfmt, clippy
target: wasm32-unknown-unknown

- name: Setup nightly Rust as default
if: matrix.rust == 'nightly'
run: rustup default $RUST_NIGHTLY_VERSION

- name: Use Cache
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -104,30 +81,35 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build
if: matrix.rust == 'stable'
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features

- name: Install nightly Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-29
override: false
components: rustfmt, clippy
target: wasm32-unknown-unknown

- name: Test
if: matrix.rust == 'nightly'
uses: actions-rs/cargo@v1
env:
env:
SOURCE_STELLAR_SECRET_MAINNET: ${{ secrets.SOURCE_STELLAR_SECRET_MAINNET }}
SOURCE_STELLAR_SECRET_TESTNET: ${{ secrets.SOURCE_STELLAR_SECRET_TESTNET }}
DEST_STELLAR_SECRET_MAINNET: ${{ secrets.DEST_STELLAR_SECRET_MAINNET }}
DEST_STELLAR_SECRET_TESTNET: ${{ secrets.DEST_STELLAR_SECRET_TESTNET }}
with:
toolchain: ${{ $RUST_NIGHTLY_VERSION }}
toolchain: nightly-2023-12-28
command: test
args: --all --all-features

- name: Rustfmt
if: matrix.rust == 'nightly'
uses: actions-rs/cargo@v1
with:
toolchain: ${{ $RUST_NIGHTLY_VERSION }}
toolchain: nightly-2023-12-28
command: fmt
args: --all -- --check

Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
- 'main'

name: continuous-integration-main

env:
RUST_NIGHTLY_VERSION: nightly-2024-02-09

jobs:
ci:
strategy:
Expand Down Expand Up @@ -59,13 +55,13 @@ jobs:
if: matrix.rust == 'nightly'
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: $RUST_NIGHTLY_VERSION
toolchain: nightly-2024-02-09
components: rustfmt, clippy
target: wasm32-unknown-unknown

- name: Setup nightly Rust as default
if: matrix.rust == 'nightly'
run: rustup default $RUST_NIGHTLY_VERSION
run: rustup default nightly-2024-02-09

- name: Use Cache
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -95,15 +91,15 @@ jobs:
DEST_STELLAR_SECRET_MAINNET: ${{ secrets.DEST_STELLAR_SECRET_MAINNET }}
DEST_STELLAR_SECRET_TESTNET: ${{ secrets.DEST_STELLAR_SECRET_TESTNET }}
with:
toolchain: ${{ $RUST_NIGHTLY_VERSION }}
toolchain: nightly-2024-02-09
command: test
args: --all --all-features

- name: Rustfmt
if: matrix.rust == 'nightly'
uses: actions-rs/cargo@v1
with:
toolchain: ${{ $RUST_NIGHTLY_VERSION }}
toolchain: nightly-2024-02-09
command: fmt
args: --all -- --check

Expand All @@ -118,6 +114,6 @@ jobs:
if: matrix.rust == 'nightly'
uses: actions-rs/cargo@v1
with:
toolchain: $RUST_NIGHTLY_VERSION
toolchain: nightly-2024-02-09
command: clippy
args: --all-features --tests --benches --examples -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references

0 comments on commit ebe7d97

Please sign in to comment.