Test AWS ARM64 ENA #1
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
| name: Test AWS ARM64 ENA | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| chr_version: | |
| description: 'RouterOS version channel' | |
| required: false | |
| default: 'stable' | |
| type: choice | |
| options: [stable, long-term, testing, development] | |
| jobs: | |
| test-ena: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
| CHR_VERSION: ${{ inputs.chr_version || 'stable' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install | |
| # qemu-nbd is needed for the extra-nic injection (partition mount) | |
| - name: Install qemu-utils | |
| run: sudo apt-get install -y qemu-utils | |
| # Build ARM64 image with extra-nic.npk injected (Linux-only step) | |
| - name: Build ARM64 image with extra-nic injection | |
| run: | | |
| bun run src/cli.ts convert $CHR_VERSION \ | |
| --provider=aws --arch=arm64 \ | |
| --output=Machines --cache=.cache | |
| # Verify injection succeeded before uploading | |
| - name: Verify extra-nic was injected | |
| run: | | |
| IMG=$(ls Machines/chr-*-arm64.img | head -1) | |
| echo "Image: $IMG ($(du -h $IMG | cut -f1))" | |
| # Mount ext4 partition 2 via nbd and check for extra-nic.npk | |
| sudo modprobe nbd max_part=8 | |
| sudo qemu-nbd --connect=/dev/nbd0 "$IMG" | |
| sleep 1 | |
| mkdir -p /tmp/chr-verify | |
| sudo mount /dev/nbd0p2 /tmp/chr-verify | |
| if ls /tmp/chr-verify/extra-nic-*.npk 2>/dev/null; then | |
| echo "✓ extra-nic.npk found in rootfs" | |
| else | |
| echo "❌ extra-nic.npk NOT found in rootfs — injection failed" | |
| exit 1 | |
| fi | |
| sudo umount /tmp/chr-verify | |
| sudo qemu-nbd --disconnect /dev/nbd0 | |
| # One-time setup: verify vmimport role + serial console enabled | |
| - name: AWS setup check | |
| run: bun run src/cli.ts setup-aws --provider=aws | |
| # Run the full E2E test: upload → import → launch → poll ENA → terminate | |
| - name: Run ENA connectivity test | |
| run: bun run scripts/test-aws-arm64.ts | |
| env: | |
| OUTPUT_DIR: Machines | |
| timeout-minutes: 45 |