Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ on:
- 'concordium-consensus/smart-contracts'
- 'concordium-consensus/haskell-lmdb'
- 'concordium-node/rustfmt.toml'
- 'plt'

pull_request:
types: [opened, synchronize, reopened, ready_for_review]
Expand All @@ -48,6 +49,7 @@ on:
- 'concordium-consensus/smart-contracts'
- 'concordium-consensus/haskell-lmdb'
- 'concordium-node/rustfmt.toml'
- 'plt'
workflow_dispatch: # allow manual trigger

env:
Expand Down
78 changes: 0 additions & 78 deletions .github/workflows/deployment-build-test.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
name: PLT scheduler checks
name: PLT scheduler build and run tests

on:
push:
branches:
- main
paths:
- '.github/workflows/deployment-build-test.yaml'
- '.github/workflows/plt-build-test.yaml'
- 'concordium-base'
- 'plt-deployment-unit'
- 'plt-scheduler'
- 'plt'

pull_request:
paths:
- '.github/workflows/plt-scheduler-build-test.yaml'
- '.github/workflows/plt-build-test.yaml'
- 'concordium-base'
- 'plt-deployment-unit'
- 'plt-scheduler'
- 'plt'
env:
CARGO_TERM_COLOR: always # implicitly adds '--color=always' to all cargo commands

Expand All @@ -29,10 +27,10 @@ jobs:
with:
submodules: recursive
- name: Run rustfmt
working-directory: plt-scheduler
working-directory: plt
run: |
rustup component add rustfmt
cargo fmt -- --check
cargo fmt --check

clippy_test:
name: Run Clippy and tests
Expand All @@ -43,10 +41,11 @@ jobs:
with:
submodules: recursive
- name: Clippy
working-directory: plt-scheduler
working-directory: plt
run: |
rustup component add clippy
cargo clippy --all-targets --all-features --locked -- -D warnings
cargo clippy --locked --all-targets --all-features -- -D warnings
- name: Test
working-directory: plt-scheduler
run: cargo test --all-targets --all-features
working-directory: plt
run: |
cargo test --locked --all-targets --all-features
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ deps/internal/crypto/build
*.ps
scripts/static-libs/static-libs-docker/output_dir/
result
**/**/Cargo.lock
0
**/**/0
scripts/genesis-data/genesis_data/**
Expand Down
22 changes: 11 additions & 11 deletions concordium-consensus/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ runCmd verbosity cmd = do
-- | Path to Concordium Smart Contract Engine rust crate relative to this file.
smartContractEngineCrateRelative = "../concordium-base/smart-contracts/wasm-chain-integration"

-- | Path to plt-scheduler rust crate relative to this file.
pltSchedulerCrateRelative = "../plt-scheduler"
-- | Path to plt rust workspace relative to this file.
pltWorkspaceRelative = "../plt"

preConfHook :: Args -> ConfigFlags -> IO HookedBuildInfo
preConfHook args flags = do
Expand All @@ -47,17 +47,17 @@ preConfHook args flags = do
runCmd verbosity $ "ln -s -f " ++ smartContractEngineCrate ++ "/target/release/libconcordium_smart_contract_engine.so " ++ libraryDestination

-- Build and copy/symlink PLT scheduler project
pltSchedulerCrate <- canonicalizePath pltSchedulerCrateRelative
runCmd verbosity $ "cargo build --release --locked --features ffi --manifest-path=" ++ pltSchedulerCrate ++ "/Cargo.toml"
pltWorkspace <- canonicalizePath pltWorkspaceRelative
runCmd verbosity $ "cargo build --release --locked --features ffi -p plt-scheduler --manifest-path=" ++ pltWorkspace ++ "/Cargo.toml"
case buildOS of
Windows -> do
runCmd verbosity $ "cp -u " ++ pltSchedulerCrate ++ "/target/release/plt_scheduler.dll " ++ libraryDestination
runCmd verbosity $ "cp -u " ++ pltWorkspace ++ "/target/release/plt_scheduler.dll " ++ libraryDestination
OSX -> do
runCmd verbosity $ "ln -s -f " ++ pltSchedulerCrate ++ "/target/release/libplt_scheduler.a " ++ libraryDestination
runCmd verbosity $ "ln -s -f " ++ pltSchedulerCrate ++ "/target/release/libplt_scheduler.dylib " ++ libraryDestination
runCmd verbosity $ "ln -s -f " ++ pltWorkspace ++ "/target/release/libplt_scheduler.a " ++ libraryDestination
runCmd verbosity $ "ln -s -f " ++ pltWorkspace ++ "/target/release/libplt_scheduler.dylib " ++ libraryDestination
_ -> do
runCmd verbosity $ "ln -s -f " ++ pltSchedulerCrate ++ "/target/release/libplt_scheduler.a " ++ libraryDestination
runCmd verbosity $ "ln -s -f " ++ pltSchedulerCrate ++ "/target/release/libplt_scheduler.so " ++ libraryDestination
runCmd verbosity $ "ln -s -f " ++ pltWorkspace ++ "/target/release/libplt_scheduler.a " ++ libraryDestination
runCmd verbosity $ "ln -s -f " ++ pltWorkspace ++ "/target/release/libplt_scheduler.so " ++ libraryDestination
return emptyHookedBuildInfo

-- | On Windows, copy the DLL files to the binary install directory. This is to ensure that they
Expand All @@ -70,8 +70,8 @@ postCopyHook _ flags pkgDescr lbi = case buildOS of
smartContractEngineCrate <- canonicalizePath smartContractEngineCrateRelative
runCmd verbosity $ "cp -u " ++ smartContractEngineCrate ++ "/target/release/concordium_smart_contract_engine.dll " ++ bindir installDirs
-- Copy DLL for PLT scheduler
pltSchedulerCrate <- canonicalizePath pltSchedulerCrateRelative
runCmd verbosity $ "cp -u " ++ pltSchedulerCrate ++ "/target/release/plt_scheduler.dll " ++ bindir installDirs
pltWorkspace <- canonicalizePath pltWorkspaceRelative
runCmd verbosity $ "cp -u " ++ pltWorkspace ++ "/target/release/plt_scheduler.dll " ++ bindir installDirs
_ -> return ()
where
distPref = fromFlag (copyDistPref flags)
Expand Down
Loading
Loading