Skip to content

Commit

Permalink
Split CI in multiple workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
SweetVishnya committed Sep 17, 2023
1 parent c229bed commit 501cf5d
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 103 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/aarch64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: aarch64

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always
jobs:
ubuntu-latest:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: uraimo/run-on-arch-action@v2
name: Build and Run Tests
with:
arch: aarch64
distro: ubuntu_latest
dockerRunArgs: |
--privileged
install: |
export CARGO_TERM_COLOR=always
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
apt-get update && apt-get install -y gdb pip curl python3.10-dev clang llvm build-essential
curl https://sh.rustup.rs -o rustup.sh && chmod +x rustup.sh && \
./rustup.sh -y && rm rustup.sh
run: |
export PATH=/root/.cargo/bin:$PATH
export CARGO_TERM_COLOR=always
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
cargo build --all-features --release --verbose
cargo test --release --verbose
30 changes: 30 additions & 0 deletions .github/workflows/amd64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: amd64

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always
jobs:
ubuntu-latest:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --all-features --verbose
- name: Run tests
run: |
sudo apt update && sudo apt install -y gdb pip curl python3.10-dev llvm \
openjdk-17-jdk
pip3 install atheris
curl https://sh.rustup.rs -o rustup.sh && chmod +x rustup.sh && \
./rustup.sh -y && rm rustup.sh
rustup install nightly
export PATH=/root/.cargo/bin:$PATH
cargo install cargo-fuzz
cargo test --release --verbose
27 changes: 27 additions & 0 deletions .github/workflows/fuzzing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: fuzzing

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always
jobs:
ubuntu-latest:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Fuzzing
run: |
curl https://sh.rustup.rs -o rustup.sh && chmod +x rustup.sh && \
./rustup.sh -y && rm rustup.sh
rustup install nightly
export PATH=/root/.cargo/bin:$PATH
cargo install cargo-fuzz
cd libcasr/fuzz
mkdir corpus
cargo +nightly fuzz run parse_stacktrace corpus init_corpus -- -max_total_time=600
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: lint

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always
jobs:
ubuntu-latest:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Code Style
run: cargo fmt -- --check
- name: Clippy
run: RUSTFLAGS="-Dwarnings" cargo clippy --all-features --all --tests
103 changes: 0 additions & 103 deletions .github/workflows/main.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/riscv64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: riscv64

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always
jobs:
ubuntu-latest:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: uraimo/run-on-arch-action@v2
name: Build and Run Tests
with:
arch: riscv64
distro: ubuntu_latest
dockerRunArgs: |
--privileged
install: |
export CARGO_TERM_COLOR=always
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
apt-get update && apt-get install -y gdb pip curl python3.10-dev clang llvm build-essential
curl https://sh.rustup.rs -o rustup.sh && chmod +x rustup.sh && \
./rustup.sh -y && rm rustup.sh
run: |
export PATH=/root/.cargo/bin:$PATH
export CARGO_TERM_COLOR=always
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
cargo build --release --verbose
cargo test --release --verbose

0 comments on commit 501cf5d

Please sign in to comment.