Add GitHub Actions CI rules (#70)
* Prepare Dockerfile for GitHub Actions * Add Action * Add CI rules * Move docker files into the docker directory to prevent fetching build artifacts * Cache Docker layers Co-authored-by: aanper <mail@s3f.ru>
This commit is contained in:
11
.github/actions/docker/action.yml
vendored
Normal file
11
.github/actions/docker/action.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
name: 'Run in docker'
|
||||
inputs:
|
||||
run: # id of input
|
||||
description: 'A command to run'
|
||||
required: true
|
||||
default: ''
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: '../../../docker/Dockerfile'
|
||||
args:
|
||||
- ${{ inputs.run }}
|
29
.github/workflows/ci.yml
vendored
Normal file
29
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: 'CI'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: satackey/action-docker-layer-caching@v0.0.8
|
||||
|
||||
- name: Build docker image
|
||||
uses: ./.github/actions/docker
|
||||
|
||||
- name: Build target_lo in docker
|
||||
uses: ./.github/actions/docker
|
||||
with:
|
||||
run: make -C target_lo
|
||||
|
||||
- name: Build target_f1 in docker
|
||||
uses: ./.github/actions/docker
|
||||
with:
|
||||
run: make -C target_f1
|
Reference in New Issue
Block a user