From 8679a057b4719f850e48e41cf9008ff44691f79b Mon Sep 17 00:00:00 2001 From: droid-dataset Date: Thu, 14 Mar 2024 17:35:54 +0000 Subject: [PATCH] add workflows and modules --- .../workflows/build_container_laptop_fr3.yaml | 60 +++++++++++++++++++ .../build_container_laptop_panda.yaml | 60 +++++++++++++++++++ .../workflows/build_container_nuc_fr3.yaml | 51 ++++++++++++++++ .../workflows/build_container_nuc_panda.yaml | 51 ++++++++++++++++ .github/workflows/pages.yaml | 59 ++++++++++++++++++ .github/workflows/pre-commit.yaml | 22 +++++++ .gitmodules | 6 ++ droid/fairo | 1 + droid/oculus_reader | 1 + 9 files changed, 311 insertions(+) create mode 100644 .github/workflows/build_container_laptop_fr3.yaml create mode 100644 .github/workflows/build_container_laptop_panda.yaml create mode 100644 .github/workflows/build_container_nuc_fr3.yaml create mode 100644 .github/workflows/build_container_nuc_panda.yaml create mode 100644 .github/workflows/pages.yaml create mode 100644 .github/workflows/pre-commit.yaml create mode 100644 .gitmodules create mode 160000 droid/fairo create mode 160000 droid/oculus_reader diff --git a/.github/workflows/build_container_laptop_fr3.yaml b/.github/workflows/build_container_laptop_fr3.yaml new file mode 100644 index 0000000..b1a89d1 --- /dev/null +++ b/.github/workflows/build_container_laptop_fr3.yaml @@ -0,0 +1,60 @@ +name: build laptop fr3 container and host on ghcr.io + +on: + push: + branches: ['main'] + paths: + - .gitmodules + - droid/** + - .docker/laptop/* + - .github/workflows/build_container_laptop_fr3 + workflow_dispatch: + +env: + REGISTRY: ghcr.io + ORG_NAME: alexanderkhazatsky + IMAGE_NAME: droid_laptop + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Free Space + run: | + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache + sudo rm -rf /usr/share/dotnet + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf ${GITHUB_WORKSPACE}/.git + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v3 + with: + context: . + file: .docker/laptop/Dockerfile.laptop_fr3 + push: true + no-cache: true + tags: ${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:fr3 diff --git a/.github/workflows/build_container_laptop_panda.yaml b/.github/workflows/build_container_laptop_panda.yaml new file mode 100644 index 0000000..e7c6253 --- /dev/null +++ b/.github/workflows/build_container_laptop_panda.yaml @@ -0,0 +1,60 @@ +name: build laptop panda container and host on ghcr.io + +on: + push: + branches: ['main'] + paths: + - .gitmodules + - droid/** + - .docker/laptop/* + - .github/workflows/build_container_laptop_panda + workflow_dispatch: + +env: + REGISTRY: ghcr.io + ORG_NAME: alexanderkhazatsky + IMAGE_NAME: droid_laptop + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Free Space + run: | + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache + sudo rm -rf /usr/share/dotnet + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf ${GITHUB_WORKSPACE}/.git + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v3 + with: + context: . + file: .docker/laptop/Dockerfile.laptop_panda + push: true + no-cache: true + tags: ${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:panda diff --git a/.github/workflows/build_container_nuc_fr3.yaml b/.github/workflows/build_container_nuc_fr3.yaml new file mode 100644 index 0000000..1bb226b --- /dev/null +++ b/.github/workflows/build_container_nuc_fr3.yaml @@ -0,0 +1,51 @@ +name: build nuc fr3 container and host on ghcr.io + +on: + push: + branches: ['main'] + paths: + - .gitmodules + - droid/** + - .docker/nuc/* + - .github/workflows/build_container_nuc_fr3 + workflow_dispatch: + +env: + REGISTRY: ghcr.io + ORG_NAME: alexanderkhazatsky + IMAGE_NAME: droid_nuc + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v3 + with: + context: . + file: .docker/nuc/Dockerfile.nuc_fr3 + push: true + no-cache: true + tags: ${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:fr3 diff --git a/.github/workflows/build_container_nuc_panda.yaml b/.github/workflows/build_container_nuc_panda.yaml new file mode 100644 index 0000000..2b9a83a --- /dev/null +++ b/.github/workflows/build_container_nuc_panda.yaml @@ -0,0 +1,51 @@ +name: build nuc panda container and host on ghcr.io + +on: + push: + branches: ['main'] + paths: + - .gitmodules + - droid/** + - .docker/nuc/* + - .github/workflows/build_container_nuc_panda + workflow_dispatch: + +env: + REGISTRY: ghcr.io + ORG_NAME: alexanderkhazatsky + IMAGE_NAME: droid_nuc + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v3 + with: + context: . + file: .docker/nuc/Dockerfile.nuc_panda + push: true + no-cache: true + tags: ${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:panda diff --git a/.github/workflows/pages.yaml b/.github/workflows/pages.yaml new file mode 100644 index 0000000..edd0e4c --- /dev/null +++ b/.github/workflows/pages.yaml @@ -0,0 +1,59 @@ +name: Deploy Documentation + +on: + push: + branches: + - "main" + paths: + - "docs/**" + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + # Build job + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: docs + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.1' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 0 # Increment this number if you need to re-download cached gems + working-directory: '${{ github.workspace }}/docs' + - name: Setup Pages + id: pages + uses: actions/configure-pages@v3 + - name: Build with Jekyll + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: production + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: "docs/_site/" + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000..be3e654 --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,22 @@ +name: pre-commit + +on: + workflow_dispatch: + schedule: + - cron: "0 9 * * 1" + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-python@v2 + - uses: pre-commit/action@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + extra_args: --files diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c0cd7dc --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "droid/oculus_reader"] + path = droid/oculus_reader + url = git@github.com:rail-berkeley/oculus_reader.git +[submodule "droid/fairo"] + path = droid/fairo + url = https://github.com/facebookresearch/fairo.git diff --git a/droid/fairo b/droid/fairo new file mode 160000 index 0000000..0a01a7f --- /dev/null +++ b/droid/fairo @@ -0,0 +1 @@ +Subproject commit 0a01a7fa7a7c65b2f9a3aebf5e79040940daf9d2 diff --git a/droid/oculus_reader b/droid/oculus_reader new file mode 160000 index 0000000..de73f3d --- /dev/null +++ b/droid/oculus_reader @@ -0,0 +1 @@ +Subproject commit de73f3d259b3c41c4564f70a64682e24aa3ac31c