Feature/nydus demo #19
Workflow file for this run
This file contains 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: nydus tests | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: ['21.x'] | |
os: ['ubuntu-latest'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '19' | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'DependencyTrack/dependency-track' | |
path: 'repotests/dependency-track' | |
- name: setup nydus | |
run: | | |
curl -LO https://github.com/dragonflyoss/nydus/releases/download/v2.2.4/nydus-static-v2.2.4-linux-amd64.tgz | |
tar -xvf nydus-static-v2.2.4-linux-amd64.tgz | |
chmod +x nydus-static/* | |
mv nydus-static/* /usr/local/bin/ | |
rm -rf nydus-static-v2.2.4-linux-amd64.tgz nydus-static | |
curl -LO https://github.com/containerd/nerdctl/releases/download/v1.7.0/nerdctl-full-1.7.0-linux-amd64.tar.gz | |
sudo tar Cxzvf /usr/local nerdctl-full-1.7.0-linux-amd64.tar.gz | |
sudo mkdir -p /etc/nydus/ | |
sudo rm -rf /var/lib/containerd-nydus | |
curl -LO https://github.com/containerd/nydus-snapshotter/releases/download/v0.13.3/nydus-snapshotter-v0.13.3-x86_64.tgz | |
sudo tar Cxzvf /usr/local/bin nydus-snapshotter-v0.13.3-x86_64.tgz | |
sudo mv /usr/local/bin/nydus-snapshotter/* /usr/local/bin/ | |
sudo cp ./ci/nydusd-config.fusedev.json /etc/nydus/nydusd-config.fusedev.json | |
sudo mkdir -p /etc/containerd | |
sudo cp ./ci/containerd-config.toml /etc/containerd/config.toml | |
sudo systemctl enable --now containerd | |
sudo systemctl restart containerd | |
- name: compile | |
run: | | |
cd repotests/dependency-track | |
mvn -q clean compile -DskipTests -Dmaven.test.skip=true | |
- name: repotests | |
run: | | |
sudo /usr/local/bin/containerd-nydus-grpc --nydusd-config /etc/nydus/nydusd-config.fusedev.json & | |
sleep 30 | |
sudo nerdctl --snapshotter nydus run --rm -v $(pwd):/app ghcr.io/cyclonedx/cdxgen:master-nydus cdxgen -v | |
sudo nerdctl --snapshotter nydus run --rm -v $HOME/.m2:$HOME/.m2 -v $(pwd):/app ghcr.io/cyclonedx/cdxgen:master-nydus cdxgen -p -t java --profile research -o /app/repotests/dependency-track/bom.json /app/repotests/dependency-track | |
cp -rf repotests/dependency-track/*.json *.slices.json bomresults/ | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: bomresults | |
path: bomresults |