-
Notifications
You must be signed in to change notification settings - Fork 79
Enhanced CI/CD #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Enhanced CI/CD #39
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b8d8f23
push images
JacopoPan 91ea8f0
added main workflow
JacopoPan 2e5e931
added package write
JacopoPan 019975b
no gpu in ci cd
JacopoPan 40b9a23
remove conda channels
JacopoPan 0892927
simpler patch
JacopoPan c1e9b72
renamed step
JacopoPan cd15ac8
cleanup workflow and more tests
JacopoPan c832240
no sensors tests
JacopoPan 66bb951
readme and test split
JacopoPan f5fc762
simpler test
JacopoPan b7cccba
test with sensors
JacopoPan 01a3ef6
sensorless tests
JacopoPan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,115 @@ | ||
| name: aas ci/cd main | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 3 * * 6' | ||
| workflow_dispatch: {} | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| jobs: | ||
| build-aircraft: | ||
| uses: ./.github/workflows/aircraft-amd64-build.yml | ||
|
|
||
| build-ground: | ||
| uses: ./.github/workflows/ground-amd64-build.yml | ||
|
|
||
| build-simulation: | ||
|
|
||
| uses: ./.github/workflows/simulation-amd64-build.yml | ||
|
|
||
| integration-test: | ||
|
|
||
| runs-on: ubuntu-22.04 | ||
| needs: [build-aircraft, build-ground, build-simulation] | ||
| timeout-minutes: 120 | ||
| permissions: | ||
| contents: read | ||
| packages: read | ||
| defaults: | ||
| run: | ||
| shell: bash -el {0} | ||
|
|
||
| steps: | ||
| - name: Free disk space | ||
| run: | | ||
| sudo rm -rf /usr/share/dotnet & | ||
| sudo rm -rf /usr/local/lib/android & | ||
| sudo rm -rf /opt/ghc & | ||
| sudo rm -rf /opt/hostedtoolcache/CodeQL & | ||
| sudo rm -rf /usr/local/share/boost & | ||
| sudo rm -rf /usr/share/swift & | ||
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" & | ||
| wait | ||
| sudo docker image prune --all --force | ||
| sudo apt-get clean | ||
| sudo rm -rf /var/lib/apt/lists/* | ||
|
|
||
| - name: Add swap space | ||
| run: | | ||
| sudo swapoff -a || true | ||
| sudo rm -f /swapfile | ||
| sudo fallocate -l 10G /swapfile | ||
| sudo chmod 600 /swapfile | ||
| sudo mkswap /swapfile | ||
| sudo swapon /swapfile | ||
|
|
||
| - name: Check swap | ||
| run: | | ||
| free -h | ||
| sudo swapon --show | ||
|
|
||
| - name: Check disk space | ||
| run: df -h | ||
|
|
||
| - name: Checkout the repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Determine Docker tag | ||
| env: | ||
| EVENT_NAME: ${{ github.event_name }} | ||
| EVENT_NUMBER: ${{ github.event.number }} | ||
| REF_NAME: ${{ github.ref_name }} | ||
| REF: ${{ github.ref }} | ||
| run: | | ||
| if [ "$EVENT_NAME" == "pull_request" ]; then | ||
| echo "DOCKER_TAG=pr-${EVENT_NUMBER}" >> $GITHUB_ENV | ||
| elif [ "$REF" == "refs/heads/main" ]; then | ||
| echo "DOCKER_TAG=latest" >> $GITHUB_ENV | ||
| else | ||
| BRANCH_TAG=$(echo "$REF_NAME" | tr '/' '-') | ||
| echo "DOCKER_TAG=${BRANCH_TAG}" >> $GITHUB_ENV | ||
| fi | ||
|
|
||
| - name: Pull and verify images | ||
| run: | | ||
| echo "Pulling images with tag: ${{ env.DOCKER_TAG }}" | ||
| docker pull ghcr.io/jacopopan/aircraft-image:${{ env.DOCKER_TAG }} | ||
| docker pull ghcr.io/jacopopan/ground-image:${{ env.DOCKER_TAG }} | ||
| docker pull ghcr.io/jacopopan/simulation-image:${{ env.DOCKER_TAG }} | ||
| echo "Locally retagging the images as latest for aas_env.py" | ||
| docker tag ghcr.io/jacopopan/aircraft-image:${{ env.DOCKER_TAG }} aircraft-image:latest | ||
| docker tag ghcr.io/jacopopan/ground-image:${{ env.DOCKER_TAG }} ground-image:latest | ||
| docker tag ghcr.io/jacopopan/simulation-image:${{ env.DOCKER_TAG }} simulation-image:latest | ||
| docker images | grep latest | ||
|
|
||
| - name: Set up Conda with Python 3.13 | ||
| uses: conda-incubator/setup-miniconda@v3 | ||
| with: | ||
| activate-environment: aas | ||
| python-version: 3.13 | ||
| auto-activate-base: false | ||
| use-only-tar-bz2: true | ||
|
|
||
| - name: Install aas-gym package | ||
| run: | | ||
| cd ./aas-gym/ | ||
| pip install -e . | ||
|
|
||
| - name: Run aas-gym test | ||
| run: python3 ./scripts/gym_run.py --mode speedup --no-camera --no-lidar | ||
This file contains hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.