Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 0 additions & 86 deletions .github/workflows/presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install go
uses: actions/setup-go@v6

Check failure on line 26 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 26 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

presubmit.yaml:26: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
go-version: '1.23.1'
- name: Install buildozer
Expand Down Expand Up @@ -88,12 +88,12 @@
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install dependencies
uses: actions/setup-go@v6

Check failure on line 91 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 91 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

presubmit.yaml:91: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
go-version: '1.25.0'
- run: go version
- name: Staticcheck
uses: dominikh/staticcheck-action@v1.3.1

Check failure on line 96 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 96 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

presubmit.yaml:96: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
version: "latest"
install-go: false
Expand Down Expand Up @@ -170,7 +170,7 @@
runs-on: ubuntu-24.04-4core
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1

Check failure on line 173 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 173 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

presubmit.yaml:173: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
large-packages: false
swap-storage: false
Expand All @@ -185,7 +185,7 @@
uses: ./.github/actions/run-cvd-unit-tests
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v6

Check failure on line 188 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 188 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

presubmit.yaml:188: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
name: cvd-unit-tests-logs
path: base/cvd/bazel-out/k8-fastbuild/testlogs
Expand All @@ -193,7 +193,7 @@
runs-on: ubuntu-24.04
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1

Check failure on line 196 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 196 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

presubmit.yaml:196: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
large-packages: false
swap-storage: false
Expand Down Expand Up @@ -222,7 +222,7 @@
- name: Build debs_amd64.tar
run: find . -name 'cuttlefish-*.deb' -print0 | tar -cvf debs_amd64.tar --null --files-from -
- name: Publish debs_amd64.tar
uses: actions/upload-artifact@v6

Check failure on line 225 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 225 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

presubmit.yaml:225: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
name: debs_amd64
path: debs_amd64.tar
Expand All @@ -245,7 +245,7 @@
- name: Build debs_arm64.tar
run: find . -name 'cuttlefish-*.deb' -print0 | tar -cvf debs_arm64.tar --null --files-from -
- name: Publish debs_arm64.tar
uses: actions/upload-artifact@v6

Check failure on line 248 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 248 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

presubmit.yaml:248: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
name: debs_arm64
path: debs_arm64.tar
Expand All @@ -256,7 +256,7 @@
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Download cuttlefish debs
uses: actions/download-artifact@v7

Check failure on line 259 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 259 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

presubmit.yaml:259: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
name: debs_amd64
- name: Build docker image
Expand All @@ -278,7 +278,7 @@
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Download cuttlefish debs
uses: actions/download-artifact@v7

Check failure on line 281 in .github/workflows/presubmit.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

presubmit.yaml:281: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
name: debs_arm64
- name: Build docker image
Expand Down Expand Up @@ -488,89 +488,3 @@
# Run create_from_images_zip_test e2e tests
cd e2etests
bazel test orchestration/create_from_images_zip_test:create_from_images_zip_test_test
e2etests-podcvd-generate-matrix:
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Generate Test List via Bazel Query
id: set-matrix
run: |
cd e2etests
PODCVD_TESTS=$(bazel query 'attr(tags, "podcvd", //cvd/...)' 2>/dev/null | sort)
PODCVD_TEST_GROUPS=$(echo "$PODCVD_TESTS" | xargs -n 3 | jq -R -n -c '[inputs] | {test_group: .}')
echo "Groupped test cases of podcvd per runner: $PODCVD_TEST_GROUPS"
echo "matrix=${PODCVD_TEST_GROUPS}" >> $GITHUB_OUTPUT
e2etests-podcvd:
name: e2etests-podcvd-${{ strategy.job-index }}
runs-on: ubuntu-24.04
needs: [e2etests-podcvd-generate-matrix, build-debian-package-amd64, build-docker-image-amd64]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.e2etests-podcvd-generate-matrix.outputs.matrix) }}
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # aka v1.3.1
with:
docker-images: false
swap-storage: false
tool-cache: true
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Download cuttlefish debs
uses: actions/download-artifact@v7
with:
name: debs_amd64
- name: Install cuttlefish-podcvd
run: |
tar -xvf debs_amd64.tar
sudo apt install -y ./cuttlefish-podcvd_*.deb
/usr/lib/cuttlefish-podcvd/bin/podcvd-setup
- name: Download docker image
uses: actions/download-artifact@v7
with:
name: cuttlefish-orchestration-amd64
- name: Upgrade crun
uses: ./.github/actions/upgrade-crun
- name: Load docker image as podman image
run: |
sudo sysctl -w kernel.unprivileged_userns_clone=1
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
sudo apt install -y skopeo

# On E2E test, it uses podman local image unlike production.
# Setting graphroot for this case is necessary to find local image by podman CLI.
DRIVER=$(podman info --format '{{ .Store.GraphDriverName }}')
GRAPHROOT=$(podman info --format '{{ .Store.GraphRoot }}')
mkdir -p /tmp/podcvd-podman-config
cat <<EOF > /tmp/podcvd-podman-config/storage.conf
[storage]
driver = "$DRIVER"
graphroot = "$GRAPHROOT"
rootless_storage_path = "$GRAPHROOT"
EOF

CONTAINERS_STORAGE_CONF=/tmp/podcvd-podman-config/storage.conf skopeo copy \
docker-archive:cuttlefish-orchestration.tar \
containers-storage:localhost/cuttlefish-orchestration:latest
- name: Run cvd e2e test for podcvd
run: |
# TODO(b/520405665): Resolve flakiness when not doing chmod.
sudo chmod 666 /dev/kvm

cd e2etests
bazel test \
${{ matrix.test_group }} \
--test_env=HOME=$HOME \
--test_env=USE_PODCVD=true \
--test_env=XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
--test_env=CONTAINERS_STORAGE_CONF=/tmp/podcvd-podman-config/storage.conf \
--test_output=errors
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v6
with:
name: e2etests-podcvd-logs-${{ strategy.job-index }}
path: e2etests/bazel-testlogs
Loading