Skip to content
This repository was archived by the owner on Aug 9, 2026. It is now read-only.

Commit 29565a3

Browse files
committed
update
1 parent ae4a6b6 commit 29565a3

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

.github/workflows/rust.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,31 @@ jobs:
3131
with:
3232
submodules: recursive
3333

34-
- name: Install QEMU
34+
- name: Setup ssh
3535
run: |
3636
mkdir ~/.ssh
3737
ssh-keyscan -H 127.0.0.1 >> ~/.ssh/known_hosts
38-
sudo apt install -y qemu-system-x86 \
39-
qemu-utils \
40-
cloud-utils \
41-
wget \
42-
sshpass \
43-
build-essential \
44-
ninja-build \
45-
meson \
46-
libclang-dev > /dev/null
38+
39+
- name: Install packages
40+
uses: awalsh128/cache-apt-pkgs-action@latest
41+
with:
42+
packages: qemu-system-x86 qemu-utils cloud-utils wget sshpass build-essential ninja-build meson libclang-dev
43+
version: 1.0
44+
execute_install_scripts: true
4745

4846
- name: Cache Ubuntu Cloud Image
4947
id: cache-ubuntu
5048
uses: actions/cache@v4
5149
with:
5250
path: |
53-
/home/ubuntu/ubuntu.qcow2
51+
/tmp/ubuntu.qcow2
5452
key: ubuntu-cloudimg-noble-${{ hashFiles('.github/workflows/rust.yml') }}
5553

5654
- name: Download Ubuntu Cloud Image
5755
if: steps.cache-ubuntu.outputs.cache-hit != 'true'
5856
run: |
59-
wget -O $HOME/ubuntu.qcow2 https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img -o /dev/null
57+
wget -O /tmp/ubuntu.qcow2 https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img -o /dev/null
58+
mv /tmp/ubuntu.qcow2 $HOME/ubuntu.qcow2
6059
qemu-img resize $HOME/ubuntu.qcow2 12G
6160

6261
- name: Create Cloud-Init Disk
@@ -113,7 +112,7 @@ jobs:
113112
path: |
114113
~/.cargo/registry
115114
~/.cargo/git
116-
target
115+
target/
117116
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
118117
restore-keys: |
119118
${{ runner.os }}-cargo-
@@ -127,7 +126,7 @@ jobs:
127126
run: |
128127
sshpass -p "ubuntu" ssh -o StrictHostKeyChecking=no -p 2222 ubuntu@127.0.0.1 << 'EOF'
129128
. "$HOME/.cargo/env"
130-
sudo apt update && sudo apt install build-essential libclang-dev
129+
sudo apt update && sudo apt install -y build-essential libclang-dev
131130
EOF
132131
sshpass -p "ubuntu" scp -o StrictHostKeyChecking=no -P 2222 -r $GITHUB_WORKSPACE ubuntu@127.0.0.1:/home/ubuntu/OxCache
133132
sshpass -p "ubuntu" scp -o StrictHostKeyChecking=no -P 2222 -r ~/.cargo ubuntu@127.0.0.1:/home/ubuntu/.cargo

0 commit comments

Comments
 (0)