diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5da41a4ce51..98a15bd1910 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,8 +6,8 @@ on: pull_request: branches: [master] schedule: - # Run daily sanity check at 00:08 clock UTC - - cron: "8 0 * * *" + # Run daily sanity check at 23:08 clock UTC + - cron: "8 23 * * *" env: CARGO_TERM_COLOR: always @@ -29,7 +29,7 @@ jobs: uses: actions/cache@v2 with: path: /go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/contrib/nydus-snapshotter/go.sum', '**/contrib/nydusify/go.sum', '**/contrib/ctr-remote/go.sum', '**/contrib/docker-nydus-graphdriver/go.sum', '**/contrib/nydus-overlayfs/go.sum') }} + key: ${{ runner.os }}-go-${{ hashFiles('**/contrib/nydusify/go.sum', '**/contrib/ctr-remote/go.sum', '**/contrib/docker-nydus-graphdriver/go.sum', '**/contrib/nydus-overlayfs/go.sum') }} restore-keys: | ${{ runner.os }}-go - name: test contrib UT @@ -56,6 +56,7 @@ jobs: echo Cargo Home: $CARGO_HOME echo Running User: $(whoami) make docker-smoke + sudo chown -R $(id -un):$(id -gn) . ~/.cargo/ deny: name: Cargo Deny diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3262284e3e5..972ff7ccb4a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,9 @@ on: push: tags: - v[0-9]+.[0-9]+.[0-9]+* + schedule: + # Run daily sanity check at 22:08 clock UTC + - cron: "8 22 * * *" env: CARGO_TERM_COLOR: always @@ -14,16 +17,10 @@ jobs: steps: - uses: actions/checkout@v2 - name: Cache cargo - uses: actions/cache@v2 + uses: Swatinem/rust-cache@v1 with: - path: | - ~/.cargo/registry - ~/.cargo/git - target-fusedev - target-virtiofs - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo + target-dir: ./target-fusedev + cache-on-failure: true - name: Build nydus-rs run: | make docker-static @@ -32,7 +29,7 @@ jobs: sudo mv target-fusedev/x86_64-unknown-linux-musl/release/nydusctl . sudo mv target-virtiofs/x86_64-unknown-linux-musl/release/nydusd nydusd-virtiofs sudo cp -r misc/configs . - sudo chown -R $(id -un):$(id -gn) . + sudo chown -R $(id -un):$(id -gn) . ~/.cargo/ - name: store-artifacts uses: actions/upload-artifact@v2 with: @@ -48,6 +45,8 @@ jobs: strategy: matrix: go-version: [1.17.x] + env: + DOCKER: false steps: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 @@ -57,7 +56,7 @@ jobs: uses: actions/cache@v2 with: path: /go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/contrib/nydus-snapshotter/go.sum', '**/contrib/nydusify/go.sum', '**/contrib/ctr-remote/go.sum', '**/contrib/docker-nydus-graphdriver/go.sum', '**/contrib/nydus-overlayfs/go.sum') }} + key: ${{ runner.os }}-go-${{ hashFiles('**/contrib/nydusify/go.sum', '**/contrib/ctr-remote/go.sum', '**/contrib/docker-nydus-graphdriver/go.sum', '**/contrib/nydus-overlayfs/go.sum') }} restore-keys: | ${{ runner.os }}-go - name: build contrib go components @@ -67,7 +66,6 @@ jobs: sudo mv contrib/docker-nydus-graphdriver/bin/nydus_graphdriver . sudo mv contrib/nydusify/cmd/nydusify . sudo mv contrib/nydus-overlayfs/bin/nydus-overlayfs . - sudo mv contrib/nydus-snapshotter/bin/containerd-nydus-grpc . - name: store-artifacts uses: actions/upload-artifact@v2 with: @@ -95,6 +93,7 @@ jobs: name: nydus-artifacts path: nydus-static - name: upload artifacts + if: ${{ github.event_name == 'push' }} run: | tag=$(echo $GITHUB_REF | cut -d/ -f3-) tarball="nydus-static-$tag-x86_64.tgz" diff --git a/Makefile b/Makefile index fc040164ea4..6d67b231ce0 100644 --- a/Makefile +++ b/Makefile @@ -110,6 +110,7 @@ docker-nydus-smoke: docker build -t nydus-smoke --build-arg ARCH=${ARCH} misc/nydus-smoke docker run --rm --privileged ${CARGO_BUILD_GEARS} \ -e TEST_WORKDIR_PREFIX=$(TEST_WORKDIR_PREFIX) \ + -v ~/.cargo:/root/.cargo \ -v $(TEST_WORKDIR_PREFIX) \ -v ${current_dir}:/nydus-rs \ nydus-smoke diff --git a/README.md b/README.md index 4b4c47c351e..9c88e12488a 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ ![CI](https://github.com/dragonflyoss/image-service/actions/workflows/ci.yml/badge.svg?event=schedule) ![Image Conversion](https://github.com/dragonflyoss/image-service/actions/workflows/convert.yml/badge.svg?event=schedule) +![Release Test Daily](https://github.com/dragonflyoss/image-service/actions/workflows/release.yml/badge.svg?event=schedule) The nydus project implements a user space filesystem on top of a container image format that improves over the current OCI image specification, in terms of container launching speed, image space, and network bandwidth efficiency, as well as data integrity.