edlang/.github/workflows/ci.yml

74 lines
2.3 KiB
YAML
Raw Normal View History

2024-02-09 08:16:29 +00:00
name: CI
on:
push:
2024-02-09 08:17:51 +00:00
branches: [master]
2024-02-09 08:16:29 +00:00
pull_request:
merge_group:
types: [checks_requested]
jobs:
check:
name: clippy
runs-on: ubuntu-latest
env:
2024-04-09 11:01:10 +00:00
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/
2024-02-09 08:16:29 +00:00
steps:
2024-04-09 11:01:47 +00:00
- uses: actions/checkout@v4
2024-02-14 08:05:42 +00:00
- uses: dtolnay/rust-toolchain@stable
2024-02-09 08:16:29 +00:00
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
2024-04-09 11:01:10 +00:00
uses: myci-actions/add-deb-repo@11
2024-02-09 08:16:29 +00:00
with:
2024-04-09 11:01:10 +00:00
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main
2024-02-09 08:16:29 +00:00
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Install LLVM
2024-04-09 11:01:10 +00:00
run: sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev
2024-02-09 08:16:29 +00:00
- name: Clippy
2024-02-09 08:22:11 +00:00
run: cargo clippy
2024-02-09 08:16:29 +00:00
fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2024-02-14 08:05:42 +00:00
- uses: dtolnay/rust-toolchain@stable
2024-02-09 08:16:29 +00:00
with:
components: rustfmt
- run: cargo fmt --all -- --check
test:
name: test (linux, amd64)
runs-on: ubuntu-latest
env:
2024-04-09 11:01:10 +00:00
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/
2024-02-09 08:16:29 +00:00
RUST_LOG: debug
steps:
2024-04-09 11:01:47 +00:00
- uses: actions/checkout@v4
2024-02-09 08:16:29 +00:00
- name: free HDD space
run: |
# deleting space
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/lib/android
- name: Setup rust env
2024-02-14 08:05:42 +00:00
uses: dtolnay/rust-toolchain@stable
2024-02-09 08:16:29 +00:00
- name: Retreive cached dependecies
uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
2024-04-09 11:01:10 +00:00
uses: myci-actions/add-deb-repo@11
2024-02-09 08:16:29 +00:00
with:
2024-04-09 11:01:10 +00:00
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main
2024-02-09 08:16:29 +00:00
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Install LLVM
2024-04-09 11:01:10 +00:00
run: sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev
2024-02-09 08:16:29 +00:00
- name: Install Link deps
run: sudo apt-get install libc-dev build-essential
- name: test
run: cargo test