Skip to content

Merge branch 'volsa/lit' of https://github.com/plc-lang/rusty into vo… #7079

Merge branch 'volsa/lit' of https://github.com/plc-lang/rusty into vo…

Merge branch 'volsa/lit' of https://github.com/plc-lang/rusty into vo… #7079

Workflow file for this run

name: Build
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
check:
name: Check
runs-on: ubuntu-latest
container: ghcr.io/plc-lang/rust-llvm:latest
steps:
- uses: actions/checkout@v3
- name: Run Check
run: |
./scripts/build.sh --check
test-linux-lit:
name: LIT
runs-on: ubuntu-latest
container: ghcr.io/plc-lang/rust-llvm:latest
steps:
- uses: actions/checkout@v3
- name: Install pipx
shell: bash
run: |
apt-get -y install pipx
pipx ensurepath
- name: Install lit
shell: bash
run: pipx install lit
test-linux:
name: Test Linux
runs-on: ubuntu-latest
container: ghcr.io/plc-lang/rust-llvm:latest
steps:
- uses: actions/checkout@v3
- name: Cargo test
shell: bash
run: |
echo "Build command : ./scripts/build.sh --build --test"
./scripts/build.sh --build --test
package-linux:
name: Package Linux
runs-on: ubuntu-latest
container: ghcr.io/plc-lang/rust-llvm:latest
steps:
- uses: actions/checkout@v3
- name: Release Build
shell: bash
run: |
echo "Build command : ./scripts/build.sh --build --release"
./scripts/build.sh --build --release --package \
--target x86_64-unknown-linux-gnu,aarch64-unknown-linux-gnu
- uses: actions/upload-artifact@master
with:
name: plc
path: target/release/plc
- uses: actions/upload-artifact@master
with:
name: schema
path: compiler/plc_project/schema
- uses: actions/upload-artifact@master
with:
name: stdlib
path: output
test-windows:
name: Test Windows
runs-on: windows-2022
env:
toolchain-version: 1.77.0
llvm-version: 14.0.6
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.toolchain-version }}
- name: Install LLVM
uses: ghaith/install-llvm-action@latest
with:
version: ${{ env.llvm-version }}
directory: "./llvm"
- name: Cargo test (Unit)
uses: actions-rs/cargo@v1
with:
command: test
args: --lib -- --nocapture
- name: Cargo test (Correctness)
uses: actions-rs/cargo@v1
with:
command: test
args: correctness -- --nocapture --test-threads=1
- name: Cargo test (Integration)
uses: actions-rs/cargo@v1
with:
command: test
args: integration -- --nocapture --test-threads=1
- name: Release Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- uses: actions/upload-artifact@master
with:
name: plc.exe
path: target/release/plc.exe
style:
name: Check Style
runs-on: ubuntu-latest
container: ghcr.io/plc-lang/rust-llvm:latest
steps:
- uses: actions/checkout@v3
- name: Run Checks
run: |
./scripts/build.sh --check-style
coverage:
name: Run Coverage
runs-on: ubuntu-latest
container: ghcr.io/plc-lang/rust-llvm:latest
steps:
- uses: actions/checkout@v3
- name: Run Checks
run: |
./scripts/build.sh --coverage
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
files: lcov.info
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: lcov.info