diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml deleted file mode 100644 index 6861d5cb..00000000 --- a/.github/workflows/appimage.yml +++ /dev/null @@ -1,220 +0,0 @@ -name: Build AppImage SLAM Server - -on: - workflow_dispatch: - workflow_call: - secrets: - GCP_CREDENTIALS: - required: true - REPO_READ_TOKEN: - required: true - ARTIFACT_READ_ONLY_GCP_CREDENTIALS: - required: true - push: - branches: main - paths-ignore: - - 'README.md' - -env: - GOPRIVATE: "github.com/viamrobotics/*,go.viam.com/*" - GOOGLE_APPLICATION_CREDENTIALS_FILENAME: "google-credentials.json" - -jobs: - appimage_orbslam: - name: AppImage Build ORB_SLAM3 - strategy: - matrix: - include: - - arch: [x64, qemu-host] - image: ghcr.io/viamrobotics/canon:amd64-cache - platform: linux/amd64 - - arch: [arm64, qemu-host] - image: ghcr.io/viamrobotics/canon:arm64-cache - platform: linux/arm64 - runs-on: ${{ matrix.arch }} - container: - image: ${{ matrix.image }} - options: --platform ${{ matrix.platform }} - timeout-minutes: 180 - - steps: - - name: Configure git for private repos - run: | - sudo -u testbot bash -lc 'echo "machine github.com login viambot password ${{ secrets.REPO_READ_TOKEN }}" > ~/.netrc' - - - name: Check out code in slam directory - uses: actions/checkout@v3 - with: - submodules: recursive - path: slam - - - name: Clean - run: | - chown -R testbot . - sudo -u testbot bash -lc 'cd slam/slam-libraries && make clean-all' - - - name: make bufinstall buf - uses: nick-fields/retry@v2 - with: - timeout_minutes: 5 - max_attempts: 3 - retry_on: timeout - shell: bash - command: | - chown -R testbot . - sudo -u testbot bash -lc 'cd slam/slam-libraries && make bufinstall buf' - - - name: make setuporb - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make setuporb' - - - name: make buildorb - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make buildorb' - - - name: make testorb - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make testorb' - - - name: Copy orb_grpc_server binary - if: matrix.platform == 'linux/amd64' - run: | - sudo cp slam/slam-libraries/viam-orb-slam3/bin/orb_grpc_server /usr/local/bin/orb_grpc_server - - - name: Check out code in rdk directory - if: matrix.platform == 'linux/amd64' - uses: actions/checkout@v3 - with: - repository: viamrobotics/rdk - path: rdk - - - name: Create GCP Credential File from secret - if: matrix.platform == 'linux/amd64' - run: | - GOOGLE_APPLICATION_CREDENTIALS=`pwd`/${GOOGLE_APPLICATION_CREDENTIALS_FILENAME} - echo "${{ secrets.ARTIFACT_READ_ONLY_GCP_CREDENTIALS }}" >> ${GOOGLE_APPLICATION_CREDENTIALS} - echo "GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}" >> $GITHUB_ENV - - - name: Run rdk slam integration tests - if: matrix.platform == 'linux/amd64' - run: | - sudo --preserve-env=GOOGLE_APPLICATION_CREDENTIALS -u testbot bash -lc 'cd rdk/services/slam/builtin && sudo go test -v -run TestOrbslamIntegration' - - - name: Build appimage - run: sudo -u testbot bash -lc 'cd slam/slam-libraries && make BUILD_CHANNEL="latest" appimageorb' - - - name: Authorize GCP Upload - uses: google-github-actions/auth@v1 - with: - credentials_json: '${{ secrets.GCP_CREDENTIALS }}' - - - name: Deploy Files - uses: google-github-actions/upload-cloud-storage@v0.10.4 - with: - headers: "cache-control: no-cache" - path: 'slam/slam-libraries/packaging/appimages/deploy/' - destination: 'packages.viam.com/apps/slam-servers/' - glob: '*' - parent: false - gzip: false - appimage_cartographer: - name: AppImage Build Cartographer - strategy: - matrix: - include: - - arch: [x64, qemu-host] - image: ghcr.io/viamrobotics/canon:amd64-cache - platform: linux/amd64 - - arch: [arm64, qemu-host] - image: ghcr.io/viamrobotics/canon:arm64-cache - platform: linux/arm64 - runs-on: ${{ matrix.arch }} - container: - image: ${{ matrix.image }} - options: --platform ${{ matrix.platform }} - timeout-minutes: 180 - - steps: - - name: Configure git for private repos - run: | - sudo -u testbot bash -lc 'echo "machine github.com login viambot password ${{ secrets.REPO_READ_TOKEN }}" > ~/.netrc' - - - name: Check out code in slam directory - uses: actions/checkout@v3 - with: - submodules: recursive - path: slam - - - name: Clean - run: | - chown -R testbot . - sudo -u testbot bash -lc 'cd slam/slam-libraries && make clean-all' - - - name: make bufinstall buf - uses: nick-fields/retry@v2 - with: - timeout_minutes: 5 - max_attempts: 3 - retry_on: timeout - shell: bash - command: | - chown -R testbot . - sudo -u testbot bash -lc 'cd slam/slam-libraries && make bufinstall buf' - - - name: make setupcarto - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make setupcarto' - - - name: make buildcarto - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make buildcarto' - - - name: make install-lua-carto - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make install-lua-carto' - - - name: make testcarto - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make testcarto' - - - name: Copy carto_grpc_server binary - if: matrix.platform == 'linux/amd64' - run: | - sudo cp slam/slam-libraries/viam-cartographer/build/carto_grpc_server /usr/local/bin/carto_grpc_server - - - name: Check out code in rdk directory - if: matrix.platform == 'linux/amd64' - uses: actions/checkout@v3 - with: - repository: viamrobotics/rdk - path: rdk - - - name: Create GCP Credential File from secret - if: matrix.platform == 'linux/amd64' - run: | - GOOGLE_APPLICATION_CREDENTIALS=`pwd`/${GOOGLE_APPLICATION_CREDENTIALS_FILENAME} - echo "${{ secrets.ARTIFACT_READ_ONLY_GCP_CREDENTIALS }}" >> ${GOOGLE_APPLICATION_CREDENTIALS} - echo "GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}" >> $GITHUB_ENV - - - name: Run rdk slam integration tests - if: matrix.platform == 'linux/amd64' - run: | - sudo --preserve-env=GOOGLE_APPLICATION_CREDENTIALS -u testbot bash -lc 'cd rdk/services/slam/builtin && sudo go test -v -run TestCartographerIntegration' - - - name: Build appimage - run: sudo -u testbot bash -lc 'cd slam/slam-libraries && make BUILD_CHANNEL="latest" appimagecarto' - - - name: Authorize GCP Upload - uses: google-github-actions/auth@v1 - with: - credentials_json: '${{ secrets.GCP_CREDENTIALS }}' - - - name: Deploy Files - uses: google-github-actions/upload-cloud-storage@v0.10.4 - with: - headers: "cache-control: no-cache" - path: 'slam/slam-libraries/packaging/appimages/deploy/' - destination: 'packages.viam.com/apps/slam-servers/' - glob: '*' - parent: false - gzip: false diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14b5e4a3..3ff1d17b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,12 +17,5 @@ on: # Don't forget to tag back to @main before merge. jobs: - appimage: - uses: viamrobotics/slam/.github/workflows/appimage.yml@main - secrets: - GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} - REPO_READ_TOKEN: ${{ secrets.REPO_READ_TOKEN }} - ARTIFACT_READ_ONLY_GCP_CREDENTIALS: ${{ secrets.ARTIFACT_READ_ONLY_GCP_CREDENTIALS }} - gotest: uses: viamrobotics/slam/.github/workflows/gotest.yml@main diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 428fb4e6..46a2b814 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -15,10 +15,5 @@ on: # Don't forget to tag back to @main before merge. jobs: - test: - uses: viamrobotics/slam/.github/workflows/test.yml@main - secrets: - ARTIFACT_READ_ONLY_GCP_CREDENTIALS: ${{ secrets.ARTIFACT_READ_ONLY_GCP_CREDENTIALS }} - gotest: uses: viamrobotics/slam/.github/workflows/gotest.yml@main diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 08ece478..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,185 +0,0 @@ -name: Test - -on: - workflow_dispatch: - workflow_call: - secrets: - ARTIFACT_READ_ONLY_GCP_CREDENTIALS: - required: true - -env: - GOPRIVATE: "github.com/viamrobotics/*,go.viam.com/*" - GOOGLE_APPLICATION_CREDENTIALS_FILENAME: "google-credentials.json" - -jobs: - format: - name: Format - runs-on: [x64, qemu-host] - container: - image: ghcr.io/viamrobotics/canon:amd64-cache - options: --platform linux/amd64 - timeout-minutes: 30 - steps: - - name: Check out code in slam directory - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Verify no uncommitted changes from make format - run: | - git init - git add . - chown -R testbot . - sudo -u testbot bash -lc 'cd slam-libraries && make format-setup format' - GEN_DIFF=$(git status -s) - - if [ -n "$GEN_DIFF" ]; then - echo '"make format" resulted in changes not in git' 1>&2 - git status - exit 1 - fi - - build_and_test_orb: - name: Build and Test Orbslam - strategy: - matrix: - include: - - arch: [x64, qemu-host] - image: ghcr.io/viamrobotics/canon:amd64-cache - platform: linux/amd64 - - arch: [arm64, qemu-host] - image: ghcr.io/viamrobotics/canon:arm64-cache - platform: linux/arm64 - runs-on: ${{ matrix.arch }} - container: - image: ${{ matrix.image }} - options: --platform ${{ matrix.platform }} - timeout-minutes: 180 - - steps: - - name: Check out code in slam directory - uses: actions/checkout@v3 - with: - submodules: recursive - path: slam - - - name: make bufinstall buf - uses: nick-fields/retry@v2 - with: - timeout_minutes: 5 - max_attempts: 3 - retry_on: timeout - shell: bash - command: | - chown -R testbot . - sudo -u testbot bash -lc 'cd slam/slam-libraries && make bufinstall buf' - - - name: make setuporb - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make setuporb' - - - name: make buildorb - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make buildorb' - - - name: make testorb - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make testorb' - - - name: Copy orb_grpc_server binary - if: matrix.platform == 'linux/amd64' - run: | - sudo cp slam/slam-libraries/viam-orb-slam3/bin/orb_grpc_server /usr/local/bin/orb_grpc_server - - - name: Check out code in rdk directory - if: matrix.platform == 'linux/amd64' - uses: actions/checkout@v3 - with: - repository: viamrobotics/rdk - path: rdk - - - name: Create GCP Credential File from secret - if: matrix.platform == 'linux/amd64' - run: | - GOOGLE_APPLICATION_CREDENTIALS=`pwd`/${GOOGLE_APPLICATION_CREDENTIALS_FILENAME} - echo "${{ secrets.ARTIFACT_READ_ONLY_GCP_CREDENTIALS }}" >> ${GOOGLE_APPLICATION_CREDENTIALS} - echo "GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}" >> $GITHUB_ENV - - - name: Run rdk orbslam integration tests - if: matrix.platform == 'linux/amd64' - run: | - sudo --preserve-env=GOOGLE_APPLICATION_CREDENTIALS -u testbot bash -lc 'cd rdk/services/slam/builtin && sudo go test -v -run TestOrbslamIntegration' - - build_and_test_cartographer: - name: Build and Test Cartographer - strategy: - matrix: - include: - - arch: [x64, qemu-host] - image: ghcr.io/viamrobotics/canon:amd64-cache - platform: linux/amd64 - - arch: [arm64, qemu-host] - image: ghcr.io/viamrobotics/canon:arm64-cache - platform: linux/arm64 - runs-on: ${{ matrix.arch }} - container: - image: ${{ matrix.image }} - options: --platform ${{ matrix.platform }} - timeout-minutes: 180 - - steps: - - name: Check out code in slam directory - uses: actions/checkout@v3 - with: - submodules: recursive - path: slam - - - name: make bufinstall buf - uses: nick-fields/retry@v2 - with: - timeout_minutes: 5 - max_attempts: 3 - retry_on: timeout - command: | - chown -R testbot . - sudo -u testbot bash -lc 'cd slam/slam-libraries && make bufinstall buf' - - - name: make setupcarto - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make setupcarto' - - - name: make buildcarto - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make buildcarto' - - - name: make install-lua-carto - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make install-lua-carto' - - - name: move testcarto - run: | - sudo -u testbot bash -lc 'cd slam/slam-libraries && make testcarto' - - - name: Copy carto_grpc_server binary - if: matrix.platform == 'linux/amd64' - run: | - sudo cp slam/slam-libraries/viam-cartographer/build/carto_grpc_server /usr/local/bin/carto_grpc_server - - - name: Check out code in rdk directory - if: matrix.platform == 'linux/amd64' - uses: actions/checkout@v3 - with: - repository: viamrobotics/rdk - path: rdk - - - name: Create GCP Credential File from secret - if: matrix.platform == 'linux/amd64' - run: | - GOOGLE_APPLICATION_CREDENTIALS=`pwd`/${GOOGLE_APPLICATION_CREDENTIALS_FILENAME} - echo "${{ secrets.ARTIFACT_READ_ONLY_GCP_CREDENTIALS }}" >> ${GOOGLE_APPLICATION_CREDENTIALS} - echo "GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}" >> $GITHUB_ENV - - - name: Run rdk cartographer integration tests - if: matrix.platform == 'linux/amd64' - run: | - sudo --preserve-env=GOOGLE_APPLICATION_CREDENTIALS -u testbot bash -lc 'cd rdk/services/slam/builtin && sudo go test -v -run TestCartographerIntegration'