Skip to content

Commit

Permalink
Updating all workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanito87 committed Feb 2, 2024
1 parent 7d0fafd commit 13f4f53
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 28 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/docker-tests.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
name: Docker tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

build:

runs-on: ubuntu-latest
runs-on: [self-hosted,"${{ matrix.os }}"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build the Docker images
run: docker-tests/build-docker-images.sh
- name: Run the Docker tests
run: docker-tests/run-docker-tests.sh userspace

1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
with:
repository: rpcpool/innernet
ref: "${{ env.innernetRef }}"
path: pathx
submodules: recursive
fetch-depth: 0
lfs: true
Expand Down
56 changes: 34 additions & 22 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,67 +12,79 @@ on:

jobs:
test:
runs-on: ${{ matrix.os }}
runs-on: [self-hosted,"${{ matrix.os }}"]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-20.04, ubuntu-22.04]

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4

- name: get channel
run: |
echo "channel=$(cat rust-toolchain.toml | grep channel | awk '{print $3}' | sed 's/"//g')" >> "$GITHUB_ENV"
- name: set cargo env
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
toolchain: ${{ env.channel }}

- name: Install Dependencies (if Ubuntu)
env:
ACCEPT_EULA: Y
run: sudo apt-get -y update && sudo apt-get install -f && sudo apt-get -y install libsqlite3-dev libclang-11-dev
if: contains(runner.os, 'Linux')

- uses: Swatinem/rust-cache@v1

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose

- name: Test (IPv6)
uses: actions-rs/cargo@v1
with:
command: test
args: --features v6-test --verbose

fmt:
runs-on: ubuntu-latest
runs-on: [self-hosted,"${{ matrix.os }}"]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4

- name: get channel
run: |
echo "channel=$(cat rust-toolchain.toml | grep channel | awk '{print $3}' | sed 's/"//g')" >> "$GITHUB_ENV"
- name: set cargo env
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
toolchain: ${{ env.channel }}

- name: Rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
runs-on: ubuntu-latest
runs-on: [self-hosted,"${{ matrix.os }}"]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions/checkout@v4

- name: get channel
run: |
echo "channel=$(cat rust-toolchain.toml | grep channel | awk '{print $3}' | sed 's/"//g')" >> "$GITHUB_ENV"
- name: Clippy
uses: actions-rs/cargo@v1
with:
Expand Down

0 comments on commit 13f4f53

Please sign in to comment.