Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test github action #25

Closed
wants to merge 2 commits into from
Closed
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: 22 additions & 27 deletions .github/workflows/test-check-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,29 @@ concurrency:

jobs:
format-code:
name: Check Code
name: Test the release
runs-on: self-hosted
container:
image: rust:1.76
steps:
- name: Checkout Code Format
- name: Checkout code
uses: actions/checkout@v3
- run: docker run --rm -v "$PWD":/src:ro -w /src --privileged rust:1.76 /bin/bash -c "cp -av /src/ /src_tmp/; cd /src_tmp; rustup component add rustfmt; cargo fmt --all -- --check"
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Install zip
run: |
apt-get update
apt-get install -y zip
user: root
- name: Semantic Release
run: |
npm install semantic-release
npx semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}

clippy-code:
name: Clippy Code
runs-on: self-hosted
steps:
- name: Checkout Code
uses: actions/checkout@v3
- run: docker run --rm -v "$PWD":/src:ro -w /src --privileged rust:1.76 /bin/bash -c "cp -av /src/ /src_tmp/; cd /src_tmp; rustup component add clippy; cargo clippy --all-targets --all-features -- -D warnings"

test-cpu:
name: Test the CPU backend
runs-on: self-hosted
steps:
- name: Checkout Code
uses: actions/checkout@v3
- run: docker run --rm -v "$PWD":/src:ro -w /src --privileged rust:1.76 /bin/bash -c "cp -av /src/ /src_tmp/; cd /src_tmp; cargo test --features cpu"

test-gpu:
name: Test the GPU backend
runs-on: self-hosted
steps:
- name: Checkout Code
uses: actions/checkout@v3
- run: docker run --rm -v "$PWD":/src:ro -w /src --gpus all --privileged rust:1.76 /bin/bash -c "nvidia-smi"
- run: docker run --rm -v "$PWD":/src:ro -w /src --gpus all --privileged rust:1.76 /bin/bash -c "cp -av /src/ /src_tmp/; cd /src_tmp; cargo test --features gpu"