CI Actions: split in two jobs
This commit is contained in:
parent
97eb603ac1
commit
d73823dcd5
1 changed files with 33 additions and 8 deletions
41
.github/workflows/ci.yml
vendored
41
.github/workflows/ci.yml
vendored
|
|
@ -2,24 +2,49 @@ name: Clixon CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches:
|
||||||
|
- master
|
||||||
|
- test-actions
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
native-build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
# 1) checkout and compile natively
|
# 1) checkout and compile natively (no test)
|
||||||
- name: install cligen
|
- name: install cligen
|
||||||
run: (git clone https://github.com/clicon/cligen.git && cd cligen && ./configure && make && sudo make install)
|
run: (git clone https://github.com/clicon/cligen.git && cd cligen && ./configure && make && sudo make install)
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: sudo apt install -y libssl-dev libnghttp2-dev
|
run: sudo apt install -y libssl-dev libnghttp2-dev
|
||||||
- name: configure
|
- name: configure
|
||||||
run: ./configure
|
run: ./configure
|
||||||
# 2) Use docker for tests
|
- name: make
|
||||||
- name: make test # this is docker test
|
run: make -j10
|
||||||
run: make test
|
- name: make install
|
||||||
|
run: sudo make install install-include
|
||||||
|
- name: make example
|
||||||
|
run: (cd example; make)
|
||||||
|
- name: make utils
|
||||||
|
run: (cd util; make)
|
||||||
|
- name: install example
|
||||||
|
run: (cd example; sudo make install)
|
||||||
|
- name: install utils
|
||||||
|
run: (cd util; sudo make install)
|
||||||
|
docker-run:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./docker/test
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# 2) Inline of make test, but without configure
|
||||||
|
- name: in-line clone
|
||||||
|
run: git clone file://$(realpath ../..)
|
||||||
|
- name: make docker
|
||||||
|
run: sudo docker build -f Dockerfile.native -t clixon/clixon-test .
|
||||||
|
- name: start container
|
||||||
|
run: ./start.sh
|
||||||
|
- name: run test
|
||||||
|
run: sudo docker exec -t clixon-test bash -c 'cd /usr/local/bin/test && detail=true ./sum.sh'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue