Skip to content

Commit

Permalink
The most important changes are the addition of several commands to bu…
Browse files Browse the repository at this point in the history
…ild and test the project in `github-build.sh` and the creation of a new GitHub Actions workflow in `asn1scc-tests.yml`. The workflow is triggered on every push or pull request to any branch and runs on the latest version of Ubuntu. It checks out the code, builds a Docker image, and then runs a container from that image. Inside the container, it executes the `github-build.sh` script to build and test the project.

Changes:
1. `github-build.sh`: Added several commands to build and test the project. The script starts by building several components of the project using `dotnet build`. It then changes directory to `v4Tests` and runs a series of tests using the `regression` binary. If any of these commands fail, the script will exit with a non-zero status code, indicating an error.
2. `asn1scc-tests.yml`: Added a new GitHub Actions workflow. This workflow is triggered on every push or pull request to any branch. It runs on the latest version of Ubuntu. The workflow checks out the code, builds a Docker image named `asn1scc`, and then runs a container from that image. Inside the container, it executes the `github-build.sh` script to build and test the project.

References to the code changes:
- [github-build.sh](#)
- [asn1scc-tests.yml](#)
  • Loading branch information
usr3-1415 committed Feb 24, 2024
1 parent ac7a53c commit 711e69e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/asn1scc-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build and Test

on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Build Docker image
run: docker build -t asn1scc .

- name: Run container to build and test
run: docker run -ti --rm -v ${{ github.workspace }}:/app asn1scc bash -c "./github-build.sh"
12 changes: 12 additions & 0 deletions github-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
dotnet build Antlr/
dotnet build parseStg2/
dotnet build "asn1scc.sln"
cd v4Tests || exit 1
../regression/bin/Debug/net7.0/regression -l c -ws 4 -s false -p 48 || exit 1
../regression/bin/Debug/net7.0/regression -l Ada -ws 4 -s false -p 48 || exit 1
../regression/bin/Debug/net7.0/regression -l c -ws 8 -s true -p 48 -ig || exit 1
../regression/bin/Debug/net7.0/regression -l c -ws 8 -s true -p 48 || exit 1
../regression/bin/Debug/net7.0/regression -l Ada -ws 8 -s true -p 48 || exit 1


0 comments on commit 711e69e

Please sign in to comment.