Skip to content

Commit

Permalink
fix(ci): use nightly only for cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi committed Jul 5, 2023
1 parent 9154c65 commit 8a5c04b
Showing 1 changed file with 45 additions and 23 deletions.
68 changes: 45 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,25 @@ on:
merge_group:

env:
toolchain: nightly-2023-06-12
nightly_toolchain: nightly-2023-06-12
stable_toolchain: stable
CARGO_HTTP_MULTIPLEXING: false
CARGO_TERM_COLOR: always
PROTOC: protoc
TERM: unknown

jobs:
clippy:
name: clippy
fmt:
name: fmt
runs-on: [ self-hosted, ubuntu18.04-high-cpu ]
steps:
- name: checkout
uses: actions/checkout@v2
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.toolchain }}
components: clippy, rustfmt
toolchain: ${{ env.nightly_toolchain }}
components: rustfmt
override: true
- name: ubuntu dependencies
run: |
Expand Down Expand Up @@ -65,6 +66,43 @@ jobs:
with:
command: fmt
args: --all -- --check
clippy:
name: clippy
runs-on: [ self-hosted, ubuntu18.04-high-cpu ]
steps:
- name: checkout
uses: actions/checkout@v2
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.stable_toolchain }}
components: clippy
override: true
- name: ubuntu dependencies
run: |
sudo apt-get update && \
sudo apt-get -y install \
build-essential \
libgtk-3-dev \
libwebkit2gtk-4.0-dev \
libsoup2.4-dev \
pkg-config \
libssl-dev \
sqlite3 \
libsqlite3-dev \
curl \
wget \
libappindicator3-dev \
patchelf \
librsvg2-dev \
libprotobuf-dev \
protobuf-compiler \
pkg-config \
libssl-dev \
sqlite3 \
libsqlite3-dev
- name: wasm target install
run: rustup target add wasm32-unknown-unknown
- name: Install cargo-lints
uses: actions-rs/cargo@v1
with:
Expand All @@ -84,7 +122,7 @@ jobs:
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.toolchain }}
toolchain: ${{ env.nightly_toolchain }}
profile: minimal
override: true
- name: ubuntu dependencies
Expand Down Expand Up @@ -185,7 +223,7 @@ jobs:
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.toolchain }}
toolchain: ${{ env.stable_toolchain }}
- name: ubuntu dependencies
run: |
sudo apt-get update && \
Expand Down Expand Up @@ -224,22 +262,6 @@ jobs:
name: cucumber-test-results
path: ${{ github.workspace }}/applications/tari_validator_node/cucumber-output-junit.xml

# Allows other workflows to know the PR number
artifacts:
runs-on: [ ubuntu-20.04 ]
steps:
- name: Save the PR number in an artifact
shell: bash
env:
PR_NUM: ${{ github.event.number }}
run: echo $PR_NUM > pr_num.txt

- name: Upload the PR number
uses: actions/upload-artifact@v2
with:
name: pr_num
path: ./pr_num.txt

# needed for test results
event_file:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 8a5c04b

Please sign in to comment.