Skip to content

Commit

Permalink
Remove raw_disk tests (#1747)
Browse files Browse the repository at this point in the history
  • Loading branch information
frelon committed Apr 13, 2023
1 parent c8df3fb commit f63f196
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 891 deletions.
112 changes: 0 additions & 112 deletions .github/build.yaml.gomplate
Original file line number Diff line number Diff line change
Expand Up @@ -725,112 +725,6 @@
{{{- if $config.slack_on_failure }}}{{{tmpl.Exec "post_failed_status_slack"}}}{{{- end }}}
{{{ end }}}

{{{define "raw_image"}}}
{{{ $config := (datasource "config") }}}
{{{ $flavor := . }}}
raw-images-{{{ $flavor }}}:
{{{ tmpl.Exec "runner" }}}

{{{- if not $config.skip_build }}}
needs:
- build-{{{ $flavor }}}-{{{ $config.arch }}}
{{{- end }}}
env:
ARCH: {{{ $config.arch }}}
LUET_ARCH: {{{ $config.arch }}}
steps:
{{{ tmpl.Exec "runner_cleanup" $config.local_runner }}}
- name: Install OS deps
run: |
sudo apt-get update
sudo apt-get install -y bc sudo curl e2fsprogs dosfstools mtools squashfs-tools gdisk make tar gzip xz-utils
- uses: actions/checkout@v3
- name: Download result for build
uses: actions/download-artifact@v3
with:
name: build-{{{ $flavor }}}-{{{ $config.arch }}}
path: build
- name: Add build repository
run: |
export DOCKER_INSTALL=true
sudo -E make add_local_repo
{{{ tmpl.Exec "make" "deps_ci" }}}
{{{ tmpl.Exec "cos_version" }}}
{{{ tmpl.Exec "make" "raw_disk" }}}
- name: Rename images
run: |
mv disk.raw cOS-Vanilla-RAW-{{{ $flavor }}}-${{ env.COS_VERSION }}-{{{ $config.arch }}}.raw
- name: Compress RAW image
run: |
tar -cvzf cOS-Vanilla-RAW-{{{ $flavor }}}-${{ env.COS_VERSION }}-{{{ $config.arch }}}.raw.tar.gz cOS-Vanilla-RAW-{{{ $flavor }}}-${{ env.COS_VERSION }}-{{{ $config.arch }}}.raw
- uses: actions/upload-artifact@v3
with:
name: cOS-Vanilla-RAW-{{{ $flavor }}}-${{ env.COS_VERSION }}-{{{ $config.arch }}}
path: |
cOS-Vanilla-RAW-{{{ $flavor }}}-${{ env.COS_VERSION }}-{{{ $config.arch }}}.raw.tar.gz
if-no-files-found: error
- name: cleanup leftovers
if: always()
run: sudo rm -rf ./*.part grub_efi.cfg root .luet.yaml oem efi || true
{{{- if $config.slack_on_failure }}}{{{tmpl.Exec "post_failed_status_slack"}}}{{{- end }}}
{{{ end }}}

{{{define "raw_image_test_deploy"}}}
{{{ $config := (datasource "config") }}}
{{{ $flavor := . }}}
tests-raw-disk-deploy-{{{ $flavor }}}:
runs-on: macos-12
needs: raw-images-{{{ $flavor }}}
steps:
{{{ tmpl.Exec "prepare_build" false }}}
- uses: actions/checkout@v3
- name: Install deps
run: brew install yq cdrtools
- name: Export cos version
run: |
export YQ=/usr/local/bin/yq
source .github/helpers.sh
echo "COS_VERSION=$(cos_version)" >> $GITHUB_ENV
- name: Download RAW image
uses: actions/download-artifact@v3
with:
name: cOS-Vanilla-RAW-{{{ $flavor }}}-${{ env.COS_VERSION }}-{{{ $config.arch }}}
- name: Untar RAW image
run: |
tar -xvf cOS-Vanilla-RAW-{{{ $flavor }}}-${{ env.COS_VERSION }}-{{{ $config.arch }}}.raw.tar.gz
- name: Run tests 🔧
run: |
sudo -E make raw_disk_test_deploy
- name: Change logs ownership
if: failure()
run: |
USER_ID=$(id -u)
GROUP_ID=$(id -g)
sudo chown $USER_ID:$GROUP_ID serial_port1.log
sudo chown $USER_ID:$GROUP_ID capture.webm || true
sudo chmod 777 serial_port1.log
sudo chmod 777 capture.webm || true
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cOS-raw_disk_test_deploy-{{{ $flavor }}}.logs.zip
path: tests/**/logs/*
if-no-files-found: warn
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cOS-raw_disk_test_deploy-{{{ $flavor }}}.serial.zip
path: serial_port1.log
if-no-files-found: warn
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cOS-raw_disk_test_deploy-{{{ $flavor }}}.capture.zip
path: capture.webm
if-no-files-found: warn
{{{- if $config.slack_on_failure }}}{{{tmpl.Exec "post_failed_status_slack"}}}{{{- end }}}
{{{ end }}}

{{{define "image_link"}}}
{{{ $config := (datasource "config") }}}
{{{ $flavor := . }}}
Expand Down Expand Up @@ -1039,12 +933,6 @@ jobs:
{{{- end }}}
{{{- end }}}

{{{- if $config.build_raw_image }}}
{{{tmpl.Exec "raw_image" $flavor}}}
{{{- if $config.run_raw_image_test }}}
{{{tmpl.Exec "raw_image_test_deploy" $flavor}}}
{{{- end }}}
{{{- end }}}
{{{- end }}}

{{{tmpl.Exec "toolchain_images"}}}
Expand Down
4 changes: 1 addition & 3 deletions .github/config/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ flavors:
skip_tests_flavor: ["teal","green","blue","orange"]
skip_images_flavor: ["teal","green", "blue","orange"]
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
release_flavor: []
luet_override: ""
build_examples_dir: ["cos-official", "scratch", "standard"]
Expand Down Expand Up @@ -56,4 +54,4 @@ flavors:
- 'Makefile'
- 'tests/**'
- 'examples/**'
slack_on_failure: false
slack_on_failure: false
18 changes: 1 addition & 17 deletions .github/config/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ flavors:
skip_tests_flavor: ["blue","orange", "green"]
skip_images_flavor: ["blue","orange", "green"]
build_image_qemu: true
build_raw_image: true
run_raw_image_test: true
run_installer_test: true
run_tests:
squashfs:
Expand Down Expand Up @@ -79,8 +77,6 @@ flavors:
skip_tests_flavor: [ "blue","orange", "green"]
skip_images_flavor: [ "blue","orange", "green" ]
build_image_qemu: true
build_raw_image: true
run_raw_image_test: false
release_flavor: [ ]
arch: "arm64"
on:
Expand All @@ -93,45 +89,33 @@ flavors:
<<: *x86_64
flavor: "orange"
publish_toolchain: false
build_raw_image: false
run_raw_image_test: false
slack_on_failure: false
arm64:
<<: *arm64
flavor: "orange"
publish_toolchain: false
build_raw_image: false
run_raw_image_test: false
slack_on_failure: false
blue:
arches:
x86_64:
<<: *x86_64
flavor: "blue"
publish_toolchain: false
build_raw_image: false
run_raw_image_test: false
slack_on_failure: false
arm64:
<<: *arm64
flavor: "blue"
publish_toolchain: false
build_raw_image: false
run_raw_image_test: false
slack_on_failure: false
green:
arches:
x86_64:
<<: *x86_64
flavor: "green"
publish_toolchain: false
build_raw_image: false
run_raw_image_test: false
slack_on_failure: false
arm64:
<<: *arm64
flavor: "green"
publish_toolchain: false
build_raw_image: false
run_raw_image_test: false
slack_on_failure: false
slack_on_failure: false
16 changes: 0 additions & 16 deletions .github/config/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ flavors:
- "test-upgrades-images-unsigned"
- "test-upgrades-local"
- "test-deploys-images-recovery"
build_raw_image: true
run_raw_image_test: true
run_installer_test: true
release_flavor: [ "teal" ]
arch: "x86_64"
Expand Down Expand Up @@ -87,8 +85,6 @@ flavors:
skip_images_packer: true
build_image_qemu: true
luet_override: ""
build_raw_image: true
run_raw_image_test: false
release_flavor: [ "teal" ]
arch: "arm64"
# labels required for this job to run, list of labels. All will be required.
Expand All @@ -104,39 +100,27 @@ flavors:
<<: *x86_64
flavor: "orange"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
arm64:
<<: *arm64
flavor: "orange"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
blue:
arches:
x86_64:
<<: *x86_64
flavor: "blue"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
arm64:
<<: *arm64
flavor: "blue"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
green:
arches:
x86_64:
<<: *x86_64
flavor: "green"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
arm64:
<<: *arm64
flavor: "green"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
18 changes: 1 addition & 17 deletions .github/config/releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ flavors:
build_image_qemu: true
luet_override: ""
luet_script_override: ""
build_raw_image: true
run_raw_image_test: true
run_installer_test: true
release_flavor: ["teal"]
run_tests:
Expand Down Expand Up @@ -80,8 +78,6 @@ flavors:
skip_tests_flavor: [ "blue","orange", "green" ]
skip_images_flavor: [ "blue","orange", "green" ]
build_image_qemu: true
build_raw_image: true
run_raw_image_test: false
release_flavor: [ "teal" ]
arch: "arm64"
on:
Expand All @@ -95,45 +91,33 @@ flavors:
<<: *x86_64
flavor: "orange"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
publish_toolchain: false
arm64:
<<: *arm64
flavor: "orange"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
publish_toolchain: false
blue:
arches:
x86_64:
<<: *x86_64
flavor: "blue"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
publish_toolchain: false
arm64:
<<: *arm64
flavor: "blue"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
publish_toolchain: false
green:
arches:
x86_64:
<<: *x86_64
flavor: "green"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
publish_toolchain: false
arm64:
<<: *arm64
flavor: "green"
build_image_qemu: false
build_raw_image: false
run_raw_image_test: false
publish_toolchain: false
publish_toolchain: false
Loading

0 comments on commit f63f196

Please sign in to comment.