mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
Test pkgs ci makefile (#3892)
* simplify test/pkg/Makefile Signed-off-by: Avi Deitcher <avi@deitcher.net> * ensure pkg and test/pkg built before downstream workflows in CI Signed-off-by: Avi Deitcher <avi@deitcher.net> Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
parent
a91c4a77b0
commit
ac8c24934c
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
@ -124,6 +124,12 @@ jobs:
|
||||
run: |
|
||||
make OPTIONS="-v --skip-platforms linux/s390x" -C pkg build
|
||||
|
||||
- name: Build Test Packages
|
||||
# ensures that the test packages are in linuxkit cache when we need them for tests later
|
||||
# Skip s390x as emulation is unreliable
|
||||
run: |
|
||||
make OPTIONS="-v --skip-platforms linux/s390x" -C test/pkg build
|
||||
|
||||
test_packages:
|
||||
name: Packages Tests
|
||||
needs: [ build_packages, build ]
|
||||
@ -181,7 +187,7 @@ jobs:
|
||||
|
||||
test_kernel:
|
||||
name: Kernel Tests
|
||||
needs: build
|
||||
needs: [ build_packages, build ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
@ -220,6 +226,14 @@ jobs:
|
||||
sudo ln -s $(pwd)/bin/linuxkit-amd64-linux /usr/local/bin/linuxkit
|
||||
/usr/local/bin/linuxkit version
|
||||
|
||||
- name: Restore Package Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.linuxkit/cache/
|
||||
key: ${{ runner.os }}-linuxkit-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-linuxkit-
|
||||
|
||||
- name: Run Tests
|
||||
run: make test TEST_SUITE=linuxkit.kernel
|
||||
|
||||
@ -277,7 +291,7 @@ jobs:
|
||||
|
||||
test_platforms:
|
||||
name: Platform Tests
|
||||
needs: build
|
||||
needs: [ build_packages, build ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
@ -316,12 +330,20 @@ jobs:
|
||||
sudo ln -s $(pwd)/bin/linuxkit-amd64-linux /usr/local/bin/linuxkit
|
||||
/usr/local/bin/linuxkit version
|
||||
|
||||
- name: Restore Package Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.linuxkit/cache/
|
||||
key: ${{ runner.os }}-linuxkit-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-linuxkit-
|
||||
|
||||
- name: Run Tests
|
||||
run: make test TEST_SUITE=linuxkit.platforms
|
||||
|
||||
test_security:
|
||||
name: Security Tests
|
||||
needs: build
|
||||
needs: [ build_packages, build ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
@ -360,5 +382,13 @@ jobs:
|
||||
sudo ln -s $(pwd)/bin/linuxkit-amd64-linux /usr/local/bin/linuxkit
|
||||
/usr/local/bin/linuxkit version
|
||||
|
||||
- name: Restore Package Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.linuxkit/cache/
|
||||
key: ${{ runner.os }}-linuxkit-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-linuxkit-
|
||||
|
||||
- name: Run Tests
|
||||
run: make test TEST_SUITE=linuxkit.security
|
||||
|
@ -1,19 +1,21 @@
|
||||
DIRS = $(dir $(shell find . -maxdepth 2 -mindepth 2 -type f --name build.yml))
|
||||
DIRS = $(dir $(shell find . -maxdepth 2 -mindepth 2 -type f -name build.yml | sort))
|
||||
.PHONY: push forcepush build forcebuild show-tag clean
|
||||
|
||||
OPTIONS ?=
|
||||
|
||||
push:
|
||||
@set -e; for d in $(DIRS); do linuxkit pkg push "$$d"; done
|
||||
linuxkit pkg push $(OPTIONS) $(DIRS)
|
||||
|
||||
forcepush:
|
||||
@set -e; for d in $(DIRS); do linuxkit pkg push --force "$$d"; done
|
||||
linuxkit pkg push $(OPTIONS) --force $(DIRS)
|
||||
|
||||
build:
|
||||
@set -e; for d in $(DIRS); do linuxkit pkg build "$$d"; done
|
||||
linuxkit pkg build $(OPTIONS) $(DIRS)
|
||||
|
||||
forcebuild:
|
||||
@set -e; for d in $(DIRS); do linuxkit pkg build --force "$$d"; done
|
||||
linuxkit pkg build $(OPTIONS) --force $(DIRS)
|
||||
|
||||
show-tag:
|
||||
@set -e; for d in $(DIRS); do linuxkit pkg show-tag "$$d"; done
|
||||
linuxkit pkg show-tag $(OPTIONS) $(DIRS)
|
||||
|
||||
clean:
|
||||
|
Loading…
Reference in New Issue
Block a user