-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop-ci' into develop. Close #139.
**Description** Ogma doesn't currently rely on Travis CI for testing, because Travis is setup to run on all NASA repositories and we run out of cycles very quickly. We need to automate the testing process as much as possible regardless, and follow our own guide for compliance with NPR7150.2D but using Github instead of Travis. **Type** - Management: Compliance with new requirement. **Additional context** None. **Requester** - Ivan Perez **Method to check presence of bug** Pull requests do not indicate any CI job. **Expected result** Pull requests do indicate a CI job that runs every time. evaluation performed by manually inspecting the PR 140 and the logs attached to the build job, and checking specifically that the build job compiles and tests ogma. **Solution implemented** Introduce a Github Actions file that installs and tests Ogma. Remove Travis CI build script. **Further notes** None.
- Loading branch information
Showing
3 changed files
with
66 additions
and
40 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,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