Skip to content

Commit

Permalink
smoke ci configurations: add configurations to stetup fscache
Browse files Browse the repository at this point in the history
  • Loading branch information
hijackthe2 committed Oct 28, 2023
1 parent c3b14bc commit f3c54d1
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -608,9 +608,31 @@ jobs:
shared-key: nydus-build
- name: Install cargo nextest
uses: taiki-e/install-action@nextest
- name: Fscache Setup
run: |
sudo apt update
sudo apt install -y cachefilesd
sudo apt list --installed | grep cachefilesd
sudo chmod a+w /etc/default/cachefilesd
sudo sed -i 's/#RUN=yes/RUN=yes/' /etc/default/cachefilesd
sudo cat /etc/default/cachefilesd
sudo /sbin/modprobe -qab cachefiles
sudo /sbin/cachefilesd -f /etc/cachefilesd.conf
sudo systemctl status cachefilesd
[ -c /dev/cachefiles ] && echo "cachefilesd is successfully enabled"
pid=$(sudo lsof /dev/cachefiles | awk '{if (NR>1) {print $2}}')
sudo kill -9 $pid
echo "/dev/cachefiles is available now"
- name: Unit Test
run: |
make ut-nextest
CARGO_HOME=${HOME}/.cargo
CARGO_BIN=$(which cargo)
TAR_PATH=$(dirname ${CARGO_BIN})
sudo -E echo ${CARGO_HOME}
sudo -E echo ${CARGO_BIN}
sudo -E echo ${TAR_PATH}
sudo -E curl -LsSf https://get.nexte.st/latest/linux | sudo -E tar zxf - -C ${TAR_PATH}
sudo -E CARGO=${CARGO_BIN} make ut-nextest
nydus-unit-test-coverage:
runs-on: ubuntu-latest
Expand All @@ -624,8 +646,31 @@ jobs:
cache-on-failure: true
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Fscache Setup
run: |
sudo apt update
sudo apt install -y cachefilesd
sudo apt list --installed | grep cachefilesd
sudo chmod a+w /etc/default/cachefilesd
sudo sed -i 's/#RUN=yes/RUN=yes/' /etc/default/cachefilesd
sudo cat /etc/default/cachefilesd
sudo /sbin/modprobe -qab cachefiles
sudo /sbin/cachefilesd -f /etc/cachefilesd.conf
sudo systemctl status cachefilesd
[ -c /dev/cachefiles ] && echo "cachefilesd is successfully enabled"
pid=$(sudo lsof /dev/cachefiles | awk '{if (NR>1) {print $2}}')
sudo kill -9 $pid
echo "/dev/cachefiles is available now"
- name: Generate code coverage
run: make coverage-codecov
run: |
CARGO_HOME=${HOME}/.cargo
CARGO_BIN=$(which cargo)
TAR_PATH=$(dirname ${CARGO_BIN})
sudo -E echo ${CARGO_HOME}
sudo -E echo ${CARGO_BIN}
sudo -E echo ${TAR_PATH}
sudo -E curl -LsSf https://get.nexte.st/latest/linux | sudo -E tar zxf - -C ${TAR_PATH}
sudo -E CARGO={CARGO_BIN} make coverage-codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down

0 comments on commit f3c54d1

Please sign in to comment.