Some checks failed
Rust Build / Check (pull_request) Successful in 1m1s
Rust Build / Test Suite (pull_request) Failing after 1m37s
Rust Build / Rustfmt (pull_request) Successful in 32s
Rust Build / Clippy (pull_request) Successful in 42s
Rust Build / build (pull_request) Successful in 59s
120 lines
3.3 KiB
YAML
120 lines
3.3 KiB
YAML
name: Rust Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- devel
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- devel
|
|
|
|
jobs:
|
|
check:
|
|
name: Check
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
toolchain: 1.85.0
|
|
- run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
|
chmod 600 ~/.ssh/gitlab_deploy_key
|
|
ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts
|
|
|
|
eval $(ssh-agent -s)
|
|
ssh-add -v ~/.ssh/gitlab_deploy_key
|
|
cargo check
|
|
|
|
test:
|
|
name: Test Suite
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
toolchain: 1.85.0
|
|
# --- Add this step for explicit verification ---
|
|
- name: Verify Docker Environment
|
|
run: |
|
|
echo "Runner User Info:"
|
|
id
|
|
echo "Checking Docker Version:"
|
|
docker --version
|
|
echo "Checking Docker Daemon Status (info):"
|
|
docker info
|
|
echo "Checking Docker Daemon Status (ps):"
|
|
docker ps -a
|
|
echo "Docker environment check complete."
|
|
# NOTE: Do NOT use continue-on-error here.
|
|
# If Docker isn't working as expected, the job SHOULD fail here.
|
|
- run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
|
chmod 600 ~/.ssh/gitlab_deploy_key
|
|
ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts
|
|
|
|
eval $(ssh-agent -s)
|
|
ssh-add -v ~/.ssh/gitlab_deploy_key
|
|
cargo test
|
|
|
|
fmt:
|
|
name: Rustfmt
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
toolchain: 1.85.0
|
|
- run: rustup component add rustfmt
|
|
- run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
|
chmod 600 ~/.ssh/gitlab_deploy_key
|
|
ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts
|
|
|
|
eval $(ssh-agent -s)
|
|
ssh-add -v ~/.ssh/gitlab_deploy_key
|
|
cargo fmt --all -- --check
|
|
|
|
clippy:
|
|
name: Clippy
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
toolchain: 1.85.0
|
|
- run: rustup component add clippy
|
|
- run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
|
chmod 600 ~/.ssh/gitlab_deploy_key
|
|
ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts
|
|
|
|
eval $(ssh-agent -s)
|
|
ssh-add -v ~/.ssh/gitlab_deploy_key
|
|
cargo clippy -- -D warnings
|
|
|
|
build:
|
|
name: build
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
toolchain: 1.85.0
|
|
- run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
|
chmod 600 ~/.ssh/gitlab_deploy_key
|
|
ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts
|
|
|
|
eval $(ssh-agent -s)
|
|
ssh-add -v ~/.ssh/gitlab_deploy_key
|
|
cargo build --release
|
|
|