This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
pkg/cache: record basenames #180
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: CI | |
on: | |
push: | |
branches: | |
- master | |
- 'release/**' | |
pull_request: | |
jobs: | |
main: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19.x | |
- uses: actions/checkout@v3 | |
with: | |
# https://github.com/reproducible-containers/repro-get/issues/3 | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- run: go test -covermode=atomic -race -v ./... | |
- name: golangci-lint | |
uses: golangci/[email protected] | |
with: | |
version: v1.50.0 | |
args: --verbose | |
- run: make integration | |
examples: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19.x | |
- uses: actions/checkout@v3 | |
with: | |
# https://github.com/reproducible-containers/repro-get/issues/3 | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- run: make && sudo make install | |
- name: Start Buildkit | |
run: | | |
docker run -d --name buildkitd --privileged moby/buildkit:v0.11.0 | |
echo "BUILDKIT_HOST=docker-container://buildkitd" >> $GITHUB_ENV | |
docker cp buildkitd:/usr/bin/buildctl /usr/local/bin/buildctl | |
sleep 3 | |
# Temporarily broken, as debian.notset.fr is down | |
# - run: ./hack/test-dockerfile-repro.sh ./examples/gcc | |
- run: ./hack/test-dockerfile-repro.sh ./examples/hello | |
generate: | |
runs-on: ubuntu-22.04 | |
# Skip the check on the master branch, as `make generate` depends on the "latest" release on | |
# https://github.com/reproducible-containers/repro-get/releases . | |
if: github.event_name == 'pull_request' | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19.x | |
- uses: actions/checkout@v3 | |
with: | |
# https://github.com/reproducible-containers/repro-get/issues/3 | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: "Check if Dockerfile* or Makefile* was changed" | |
run: | | |
set -eux | |
git diff --name-only "origin/${GITHUB_BASE_REF}" | tee /tmp/gitdiff | |
grep -E "(Dockerfile|Makefile)" /tmp/gitdiff | |
id: gitdiff | |
continue-on-error: true | |
- name: "Make sure that auto-generated files are kept in sync" | |
if: ${{ steps.gitdiff.outcome == 'success' }} | |
run: | | |
set -eux | |
make | |
sudo make install | |
make generate | |
if [ -n "$(git status --porcelain)" ]; then | |
echo >&2 "Auto-generated files were manually modified?" | |
exit 1 | |
fi |