Skip to content

Commit

Permalink
Merge branch 'master' of github.com:PLC-lang/rusty into derive_more
Browse files Browse the repository at this point in the history
  • Loading branch information
mhasel committed Jun 19, 2024
2 parents d6b1a7a + 45f487f commit e274290
Show file tree
Hide file tree
Showing 518 changed files with 5,097 additions and 3,205 deletions.
2 changes: 2 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[profile.ci.junit]
path = "junit.xml"
52 changes: 1 addition & 51 deletions .github/workflows/rust.yml → .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build Linux

on:
# Triggers the workflow on push or pull request events but only for the master branch
Expand Down Expand Up @@ -63,56 +63,6 @@ jobs:
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
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/lit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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:
lit-linux-debug:
name: lit tests (Linux, debug build)
runs-on: ubuntu-latest
container: ghcr.io/plc-lang/rust-llvm:latest
steps:
- uses: actions/checkout@v3

- name: Run `build.sh --lit`
shell: bash
run: |
./scripts/build.sh --lit
lit-linux-release:
name: lit tests (Linux, release build)
runs-on: ubuntu-latest
container: ghcr.io/plc-lang/rust-llvm:latest
steps:
- uses: actions/checkout@v3

- name: Run `build.sh --lit --release`
shell: bash
run: |
./scripts/build.sh --lit --release
50 changes: 50 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build Windows

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:
build:
name: Windows Build
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)
run: cargo test --lib -- --nocapture

- name: Cargo test (Correctness)
run: cargo test correctness -- --nocapture --test-threads=1

- name: Cargo test (Integration)
run: cargo test integration -- --nocapture --test-threads=1

- name: Release Build
run: cargo build --release --workspace

- uses: actions/upload-artifact@master
with:
name: plc.exe
path: target/release/plc.exe

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
*.a
*.elf
*.out

# Garbage generated by llvm-lit
tests/lit/**/*.txt
tests/lit/**/Output/
4 changes: 1 addition & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
}
},
"args": [
"--check",
"target/demo.st",
"-i","libs/stdlib/iec61131-st/timers.st"
],
"cwd": "${workspaceFolder}"
},
Expand All @@ -48,4 +46,4 @@
"cwd": "${workspaceFolder}"
},
]
}
}
Loading

0 comments on commit e274290

Please sign in to comment.