ci: run in self hosted runners

Signed-off-by: Adam Olech <aolech@antmicro.com>
This commit is contained in:
Adam Olech 2021-01-05 15:46:28 +01:00
parent 98f452d601
commit 3c941676c5

View file

@ -4,7 +4,7 @@ on: [push, pull_request]
jobs: jobs:
test-sphinx-docs: test-sphinx-docs:
runs-on: ubuntu-18.04 runs-on: [self-hosted, Linux, X64]
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -46,31 +46,33 @@ jobs:
- {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "litex_linux"} - {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "litex_linux"}
env: env:
LANG: "en_US.UTF-8" LANG: "en_US.UTF-8"
DOCKER_NAME: test DEBIAN_FRONTEND: "noninteractive"
IN_DOCKER_EXEC: "docker exec -t test bash -e -c" BASH_CMD: "bash -ex -"
container: ${{matrix.os}}:${{matrix.os-version}}
steps: steps:
- name: Setup repository - name: Setup repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set Up Python - name: Install utils
uses: actions/setup-python@v2 if: ${{matrix.os == 'ubuntu' || matrix.os == 'debian'}}
run: apt -qqy update && apt -qqy install wget locales && locale-gen $LANG
- name: Setup Docker - name: Install utils
run: | if: ${{matrix.os == 'centos'}}
docker create --name $DOCKER_NAME -v $PWD:$PWD --workdir $PWD --tty ${{matrix.os}}:${{matrix.os-version}} run: yum -y install wget
docker start $DOCKER_NAME
- name: Install tuttest - name: Install tuttest
run: | run: |
sudo locale-gen $LANG wget https://github.com/antmicro/tuttest/releases/download/0.1.1/tuttest -O /usr/bin/tuttest
pip3 install git+https://github.com/antmicro/tuttest#egg=tuttest chmod a+rx /usr/bin/tuttest
- name: Install SymbiFlow toolchain - name: Install SymbiFlow toolchain
run: bash .github/scripts/install-toolchain.sh ${{matrix.fpga-fam}} ${{matrix.os}} | ${IN_DOCKER_EXEC} "$(cat /dev/stdin)" run: bash .github/scripts/install-toolchain.sh ${{matrix.fpga-fam}} ${{matrix.os}} | ${BASH_CMD}
- name: Build examples - name: Build examples
run: bash .github/scripts/build-examples.sh ${{matrix.fpga-fam}} ${{matrix.example}} | ${IN_DOCKER_EXEC} "$(cat /dev/stdin)" run: bash .github/scripts/build-examples.sh ${{matrix.fpga-fam}} ${{matrix.example}} | ${BASH_CMD}
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with: