-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-1.4.0'. Refs #145.
- Loading branch information
Showing
31 changed files
with
279 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: ros-ghc-8.6-cabal-2.4 | ||
|
||
# Trigger the workflow on push or pull request | ||
on: | ||
- pull_request | ||
- push | ||
|
||
jobs: | ||
cabal: | ||
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
cabal: ["2.4"] | ||
ghc: | ||
- "8.6" | ||
|
||
steps: | ||
|
||
- uses: haskell-actions/setup@main | ||
id: setup-haskell-cabal | ||
name: Setup Haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: ${{ matrix.cabal }} | ||
|
||
- name: Prepare environment | ||
run: | | ||
echo "$HOME/.ghcup/bin" >> $GITHUB_PATH | ||
echo "$HOME/.cabal/bin" >> $GITHUB_PATH | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Create sandbox | ||
run: | | ||
echo "$PWD/.cabal-sandbox/bin" >> $GITHUB_PATH | ||
cabal v1-sandbox init | ||
- name: Install dependencies | ||
run: | | ||
cabal v1-install alex happy | ||
- name: Install ogma | ||
run: | | ||
cabal v1-install copilot ogma-**/ --constraint="copilot >= 3.19.1" | ||
- name: Generate ROS app | ||
run: | | ||
ogma ros --app-target-dir demo --variable-db ogma-cli/examples/ros-copilot/vars-db --variable-file ogma-cli/examples/ros-copilot/variables --handlers-file ogma-cli/examples/ros-copilot/handlers | ||
cabal v1-exec -- runhaskell ogma-cli/examples/ros-copilot/ROS.hs | ||
find demo/ | ||
cd demo/ | ||
docker build . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: install-hackage-ghc-8.6-cabal-2.4 | ||
|
||
# Trigger the workflow on push or pull request | ||
on: | ||
- pull_request | ||
- push | ||
|
||
jobs: | ||
cabal: | ||
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
cabal: ["2.4"] | ||
ghc: | ||
- "8.6" | ||
|
||
steps: | ||
|
||
- uses: haskell-actions/setup@main | ||
id: setup-haskell-cabal | ||
name: Setup Haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: ${{ matrix.cabal }} | ||
|
||
- name: Prepare environment | ||
run: | | ||
echo "$HOME/.ghcup/bin" >> $GITHUB_PATH | ||
echo "$HOME/.cabal/bin" >> $GITHUB_PATH | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Create sandbox | ||
run: | | ||
echo "$PWD/.cabal-sandbox/bin" >> $GITHUB_PATH | ||
cabal v1-sandbox init | ||
- name: Install dependencies | ||
run: | | ||
cabal v1-install alex happy | ||
- name: Install ogma | ||
run: | | ||
# Some tests need the ogma executable to be in the path, which won't | ||
# happen until installation completes successfully (which only happens | ||
# after tests if running tests is enabled). We therefore need to run | ||
# the installation twice: once without --run-tests, and again with | ||
# --run-tests. | ||
# | ||
# We still --enable-tests in the first compilation to make sure that | ||
# the dependencies do not change and cabal does not change the | ||
# installation plan (which would mean we'd be running the tests with a | ||
# version of ogma compiled with different dependencies). | ||
cabal v1-install ogma-**/ --enable-tests | ||
- name: Test all packages | ||
run: | | ||
# We want to document the build process, and get detailed information | ||
# if there is a problem (or if all goes well). We therefore execute the | ||
# installation with -j1. | ||
cabal v1-install ogma-**/ --enable-tests --run-tests -j1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Copilot.Compile.C99 | ||
import Copilot.Language | ||
import Language.Copilot (reify) | ||
import Prelude hiding (not, (&&), (>=)) | ||
|
||
inputSignal :: Stream Int64 | ||
inputSignal = extern "input_signal" Nothing | ||
|
||
inputSignalFloat :: Stream Float | ||
inputSignalFloat = extern "input_signal_float" Nothing | ||
|
||
inputSignalDouble :: Stream Double | ||
inputSignalDouble = extern "input_signal_double" Nothing | ||
|
||
propTestCopilot :: Stream Bool | ||
propTestCopilot = inputSignal >= 5 | ||
&& inputSignalFloat >= 5 | ||
&& inputSignalDouble >= 5 | ||
|
||
spec :: Spec | ||
spec = do | ||
trigger "handlerTestCopilot" (not propTestCopilot) [] | ||
|
||
main :: IO () | ||
main = reify spec >>= compileWith settings "monitor" | ||
where | ||
settings = mkDefaultCSettings | ||
{ cSettingsOutputDirectory = "demo/copilot/src/" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
handlerTestCopilot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
input_signal | ||
input_signal_float | ||
input_signal_double |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
("input_signal","int64_t","/demo/topic","int64_t") | ||
("input_signal_float","float","/demo/topicf","float") | ||
("input_signal_double","double","/demo/topicd","double") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM osrf/space-ros:latest | ||
|
||
ARG USER=spaceros-user | ||
ARG PACKAGE_PATH=/home/${USER}/monitors | ||
ARG ROS_PATH=/home/${USER}/spaceros/ | ||
|
||
RUN mkdir -p ${PACKAGE_PATH}/src/ | ||
ADD copilot ${PACKAGE_PATH}/src/copilot | ||
USER root | ||
RUN chown -R ${USER} ${PACKAGE_PATH} | ||
USER ${USER} | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
WORKDIR ${PACKAGE_PATH} | ||
RUN source ${ROS_PATH}/install/setup.bash && \ | ||
colcon build |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.