Ci/Improve scheduled tasks (#1028)

This commit is contained in:
Luni-4 2023-12-12 15:42:33 +01:00 committed by GitHub
parent 71d3c1d142
commit 1a5f252ac6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 98 additions and 29 deletions

View File

@ -5,7 +5,7 @@ on:
- cron: '0 21 * * TUE' # Run every Tuesday at 21:00 (UTC) - cron: '0 21 * * TUE' # Run every Tuesday at 21:00 (UTC)
push: push:
tags: tags:
- 'v*.*.*' - 'v*.*.*' # Run when a new version is being published
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
@ -21,6 +21,8 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Audit Rust dependencies - name: Audit Rust dependencies
# If a vulnerability is found, a new issue will automatically be opened
# since this action runs on main branch
uses: actions-rust-lang/audit@v1 uses: actions-rust-lang/audit@v1
- name: Detect multiple versions of the same crate - name: Detect multiple versions of the same crate

35
.github/workflows/valgrind.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: valgrind
on:
schedule:
- cron: '0 23 * * WED' # Run every Wednesday at 23:00 (UTC)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
valgrind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install llvmpipe and lavapipe
run: |
sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/kisak-mesa -y
sudo apt-get update
sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: Install valgrind
run: |
sudo apt-get install valgrind
- name: Run cargo-valgrind
env:
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind -s --leak-check=full --show-leak-kinds=all --error-exitcode=1"
# Looking for vulnerabilities
run: |
cargo test

View File

@ -2,38 +2,16 @@ name: vulnerabilities
on: on:
schedule: schedule:
- cron: '0 21 * * TUE' # Run every Tuesday at 21:00 (UTC) - cron: '0 21 * * WED' # Run every Wednesday at 21:00 (UTC)
push: push:
tags: tags:
- 'v*.*.*' - 'v*.*.*' # Run when a new version is being published
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
valgrind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install llvmpipe and lavapipe
run: |
sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/kisak-mesa -y
sudo apt-get update
sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: Install valgrind
run: |
sudo apt-get install valgrind
- name: Run cargo-valgrind
env:
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind -s --leak-check=full --show-leak-kinds=all --error-exitcode=1"
# Looking for vulnerabilities
run: |
cargo test
cargo-careful: cargo-careful:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -120,3 +98,57 @@ jobs:
RUSTDOCFLAGS: -Zsanitizer=thread RUSTDOCFLAGS: -Zsanitizer=thread
# Looking for data race among threads # Looking for data race among threads
run: cargo test -Zbuild-std --target x86_64-unknown-linux-gnu -- --nocapture run: cargo test -Zbuild-std --target x86_64-unknown-linux-gnu -- --nocapture
memory-sanitizer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
components: rustfmt, rust-src
- name: Install llvmpipe and lavapipe
run: |
sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/kisak-mesa -y
sudo apt-get update
sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: Run MemorySanitizer
env:
RUSTFLAGS: -Zsanitizer=memory -Zsanitizer-memory-track-origins -Copt-level=3
RUSTDOCFLAGS: -Zsanitizer=memory -Zsanitizer-memory-track-origins
# Looking for unitialized memory.
run: cargo test -Zbuild-std --target x86_64-unknown-linux-gnu -- --nocapture
safe-stack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
components: rustfmt, rust-src
- name: Install llvmpipe and lavapipe
run: |
sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/kisak-mesa -y
sudo apt-get update
sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: Run SafeStack
env:
RUSTFLAGS: -Zsanitizer=safestack -Copt-level=3
RUSTDOCFLAGS: -Zsanitizer=safestack
# Provides backward edge control flow protection
run: cargo test -Zbuild-std --target x86_64-unknown-linux-gnu -- --nocapture