Skip to content

Commit

Permalink
Update package before make
Browse files Browse the repository at this point in the history
  • Loading branch information
Jie Chen committed Jan 17, 2025
1 parent cdd9d7c commit 0432c0b
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:

GOTESTSUM_CMD: "gotestsum --format standard-verbose --debug --"
GOTESTSUM_CMD_RAW: "gotestsum --format standard-verbose --debug --raw-command -- go tool test2json -t"
LINUX_BOOT_FILES_PATH: ${{ github.workspace }}/LinuxBootFiles

jobs:
create-linux-boot-files:
Expand Down Expand Up @@ -48,30 +49,32 @@ jobs:
--path ./downloaded_artifacts
- name: Show packages
run: find . -maxdepth 8 -ls
run: find ./downloaded_artifacts -maxdepth 3 -ls

- name: Copy Linux kernel to a temp folder
- name: Copy Linux kernel and rootfs tar files
run: |
mkdir -p temp/
mv ./downloaded_artifacts/LinuxBootFiles/kernel ./temp/
mv ./downloaded_artifacts/LinuxBootFiles/vmlinux ./temp/
mv ./downloaded_artifacts/LinuxBootFiles/kernel ${{ env.LINUX_BOOT_FILES_PATH }}/
mv ./downloaded_artifacts/LinuxBootFiles/vmlinux ${{ env.LINUX_BOOT_FILES_PATH }}/
mv ./downloaded_artifacts/rootfs-*.tar.gz .
- name: Create a new rootfs.vhd containing the local Linux-GCS
run: |
sudo apt-get update
sudo apt-get install -y make gcc binutils linux-headers-generic libarchive-tools \
btrfs-progs libseccomp-dev pkg-config cpio
make clean
make BASE=./rootfs-*.tar.gz all
- name: Move created rootfs files to the temp folder
- name: Copy newly created rootfs.vhd and initrd.img
run: |
mv ./rootfs_*.vhd ./temp/
mv ./initrd.img ./temp/
mv ./rootfs_*.vhd ${{ env.LINUX_BOOT_FILES_PATH }}/
mv ./initrd.img ${{ env.LINUX_BOOT_FILES_PATH }}/
# This is a workaround to overcome the limitation of actions/upload-artifact@v4.
# See https://github.com/actions/upload-artifact/tree/v4/?tab=readme-ov-file#permission-loss.
- name: Tar the files to preserve file permissions prior to upload
run: |
cd temp
cd ${{ env.LINUX_BOOT_FILES_PATH }}
tar -cvf ../linux_boot_files.tar .
- name: Upload Linux boot files to artifact
Expand Down Expand Up @@ -349,8 +352,6 @@ jobs:
runner: [self-hosted, 1ES.Pool=containerplat-github-runner-pool-east-us-2, 1ES.ImageOverride=github-mms-ws2019-containers-enabled]
- name: "windows-2022"
runner: [self-hosted, 1ES.Pool=containerplat-github-runner-pool-east-us-2, 1ES.ImageOverride=github-mms-ws2022-containers-enabled]
env:
LINUX_BOOT_FILES_PATH: ${{ github.workspace }}/LinuxBootFiles
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -428,7 +429,8 @@ jobs:

- name: Extract Linux boot files
shell: pwsh
run: tar -xvf linux_boot_files.tar -C ${{ env.LINUX_BOOT_FILES_PATH }}/
run: |
tar -xvf linux_boot_files.tar -C ${{ env.LINUX_BOOT_FILES_PATH }}/
- name: Display downloaded Linux boot files
shell: pwsh
Expand Down

0 comments on commit 0432c0b

Please sign in to comment.