ci: hook to GitHub Actions
With the recent changes in terms of free access to the Travis CI, let's
offer an alternative with GitHub Actions.
Running jobs on ARM is not supported unless using external runners, so
this commit only adds builds for x86_64 and cross compiling for i386 and
aarch64.
Differences with the Travis CI integration:
- Error logs are not dumped to the console when something goes wrong.
Instead, they are gathered in a "catch-all" step and attached as
artifacts.
- A cache entry is stored once and for all, but if no cache is found you
can inherit from the default branch cache. The cache is 5GB large, for
the whole git repository.
- The maximum retention of logs and artifacts is 3 months.
- /home/runner is world writable, so a workaround has been added for
starting dpdk processes.
- Ilya, working on OVS GHA support, noticed that jobs can run with
processors that don't have the same capabilities. For DPDK, this
impacts the ccache content since everything was built with
-march=native so far, and we will end up with binaries that can't run
in a later build. The problem has not been seen in Travis CI (?) but
it is safer to use a fixed "-Dmachine=default" in any case.
- Scheduling jobs is part of the configuration and takes the form of a
crontab. A build is scheduled every Monday at 0:00 (UTC) to provide a
default ccache for the week (useful for the ovsrobot).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-12-04 17:36:21 +00:00
|
|
|
name: build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 1'
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash --noprofile --norc -exo pipefail {0}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: ${{ join(matrix.config.*, '-') }}
|
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
env:
|
|
|
|
AARCH64: ${{ matrix.config.cross == 'aarch64' }}
|
2020-12-04 17:36:22 +00:00
|
|
|
ABI_CHECKS: ${{ contains(matrix.config.checks, 'abi') }}
|
ci: hook to GitHub Actions
With the recent changes in terms of free access to the Travis CI, let's
offer an alternative with GitHub Actions.
Running jobs on ARM is not supported unless using external runners, so
this commit only adds builds for x86_64 and cross compiling for i386 and
aarch64.
Differences with the Travis CI integration:
- Error logs are not dumped to the console when something goes wrong.
Instead, they are gathered in a "catch-all" step and attached as
artifacts.
- A cache entry is stored once and for all, but if no cache is found you
can inherit from the default branch cache. The cache is 5GB large, for
the whole git repository.
- The maximum retention of logs and artifacts is 3 months.
- /home/runner is world writable, so a workaround has been added for
starting dpdk processes.
- Ilya, working on OVS GHA support, noticed that jobs can run with
processors that don't have the same capabilities. For DPDK, this
impacts the ccache content since everything was built with
-march=native so far, and we will end up with binaries that can't run
in a later build. The problem has not been seen in Travis CI (?) but
it is safer to use a fixed "-Dmachine=default" in any case.
- Scheduling jobs is part of the configuration and takes the form of a
crontab. A build is scheduled every Monday at 0:00 (UTC) to provide a
default ccache for the week (useful for the ovsrobot).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-12-04 17:36:21 +00:00
|
|
|
BUILD_32BIT: ${{ matrix.config.cross == 'i386' }}
|
|
|
|
BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }}
|
|
|
|
CC: ccache ${{ matrix.config.compiler }}
|
|
|
|
DEF_LIB: ${{ matrix.config.library }}
|
2020-12-04 17:36:22 +00:00
|
|
|
LIBABIGAIL_VERSION: libabigail-1.8
|
2021-08-08 19:26:58 +00:00
|
|
|
REF_GIT_TAG: none
|
ci: hook to GitHub Actions
With the recent changes in terms of free access to the Travis CI, let's
offer an alternative with GitHub Actions.
Running jobs on ARM is not supported unless using external runners, so
this commit only adds builds for x86_64 and cross compiling for i386 and
aarch64.
Differences with the Travis CI integration:
- Error logs are not dumped to the console when something goes wrong.
Instead, they are gathered in a "catch-all" step and attached as
artifacts.
- A cache entry is stored once and for all, but if no cache is found you
can inherit from the default branch cache. The cache is 5GB large, for
the whole git repository.
- The maximum retention of logs and artifacts is 3 months.
- /home/runner is world writable, so a workaround has been added for
starting dpdk processes.
- Ilya, working on OVS GHA support, noticed that jobs can run with
processors that don't have the same capabilities. For DPDK, this
impacts the ccache content since everything was built with
-march=native so far, and we will end up with binaries that can't run
in a later build. The problem has not been seen in Travis CI (?) but
it is safer to use a fixed "-Dmachine=default" in any case.
- Scheduling jobs is part of the configuration and takes the form of a
crontab. A build is scheduled every Monday at 0:00 (UTC) to provide a
default ccache for the week (useful for the ovsrobot).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-12-04 17:36:21 +00:00
|
|
|
RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
compiler: gcc
|
|
|
|
library: static
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
compiler: gcc
|
|
|
|
library: shared
|
2021-08-08 19:26:58 +00:00
|
|
|
checks: doc+tests
|
ci: hook to GitHub Actions
With the recent changes in terms of free access to the Travis CI, let's
offer an alternative with GitHub Actions.
Running jobs on ARM is not supported unless using external runners, so
this commit only adds builds for x86_64 and cross compiling for i386 and
aarch64.
Differences with the Travis CI integration:
- Error logs are not dumped to the console when something goes wrong.
Instead, they are gathered in a "catch-all" step and attached as
artifacts.
- A cache entry is stored once and for all, but if no cache is found you
can inherit from the default branch cache. The cache is 5GB large, for
the whole git repository.
- The maximum retention of logs and artifacts is 3 months.
- /home/runner is world writable, so a workaround has been added for
starting dpdk processes.
- Ilya, working on OVS GHA support, noticed that jobs can run with
processors that don't have the same capabilities. For DPDK, this
impacts the ccache content since everything was built with
-march=native so far, and we will end up with binaries that can't run
in a later build. The problem has not been seen in Travis CI (?) but
it is safer to use a fixed "-Dmachine=default" in any case.
- Scheduling jobs is part of the configuration and takes the form of a
crontab. A build is scheduled every Monday at 0:00 (UTC) to provide a
default ccache for the week (useful for the ovsrobot).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-12-04 17:36:21 +00:00
|
|
|
- os: ubuntu-18.04
|
|
|
|
compiler: clang
|
|
|
|
library: static
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
compiler: clang
|
|
|
|
library: shared
|
|
|
|
checks: doc+tests
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
compiler: gcc
|
|
|
|
library: static
|
|
|
|
cross: i386
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
compiler: gcc
|
|
|
|
library: static
|
|
|
|
cross: aarch64
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
compiler: gcc
|
|
|
|
library: shared
|
|
|
|
cross: aarch64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Generate cache keys
|
|
|
|
id: get_ref_keys
|
|
|
|
run: |
|
|
|
|
echo -n '::set-output name=ccache::'
|
|
|
|
echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W)
|
2020-12-04 17:36:22 +00:00
|
|
|
echo -n '::set-output name=libabigail::'
|
|
|
|
echo 'libabigail-${{ matrix.config.os }}'
|
|
|
|
echo -n '::set-output name=abi::'
|
|
|
|
echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}'
|
ci: hook to GitHub Actions
With the recent changes in terms of free access to the Travis CI, let's
offer an alternative with GitHub Actions.
Running jobs on ARM is not supported unless using external runners, so
this commit only adds builds for x86_64 and cross compiling for i386 and
aarch64.
Differences with the Travis CI integration:
- Error logs are not dumped to the console when something goes wrong.
Instead, they are gathered in a "catch-all" step and attached as
artifacts.
- A cache entry is stored once and for all, but if no cache is found you
can inherit from the default branch cache. The cache is 5GB large, for
the whole git repository.
- The maximum retention of logs and artifacts is 3 months.
- /home/runner is world writable, so a workaround has been added for
starting dpdk processes.
- Ilya, working on OVS GHA support, noticed that jobs can run with
processors that don't have the same capabilities. For DPDK, this
impacts the ccache content since everything was built with
-march=native so far, and we will end up with binaries that can't run
in a later build. The problem has not been seen in Travis CI (?) but
it is safer to use a fixed "-Dmachine=default" in any case.
- Scheduling jobs is part of the configuration and takes the form of a
crontab. A build is scheduled every Monday at 0:00 (UTC) to provide a
default ccache for the week (useful for the ovsrobot).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-12-04 17:36:21 +00:00
|
|
|
- name: Retrieve ccache cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.ccache
|
|
|
|
key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
|
2020-12-04 17:36:22 +00:00
|
|
|
- name: Retrieve libabigail cache
|
|
|
|
id: libabigail-cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
if: env.ABI_CHECKS == 'true'
|
|
|
|
with:
|
|
|
|
path: libabigail
|
|
|
|
key: ${{ steps.get_ref_keys.outputs.libabigail }}
|
|
|
|
- name: Retrieve ABI reference cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
if: env.ABI_CHECKS == 'true'
|
|
|
|
with:
|
|
|
|
path: reference
|
|
|
|
key: ${{ steps.get_ref_keys.outputs.abi }}
|
2020-12-19 08:05:33 +00:00
|
|
|
- name: Update APT cache
|
2021-02-01 14:30:59 +00:00
|
|
|
run: sudo apt update || true
|
ci: hook to GitHub Actions
With the recent changes in terms of free access to the Travis CI, let's
offer an alternative with GitHub Actions.
Running jobs on ARM is not supported unless using external runners, so
this commit only adds builds for x86_64 and cross compiling for i386 and
aarch64.
Differences with the Travis CI integration:
- Error logs are not dumped to the console when something goes wrong.
Instead, they are gathered in a "catch-all" step and attached as
artifacts.
- A cache entry is stored once and for all, but if no cache is found you
can inherit from the default branch cache. The cache is 5GB large, for
the whole git repository.
- The maximum retention of logs and artifacts is 3 months.
- /home/runner is world writable, so a workaround has been added for
starting dpdk processes.
- Ilya, working on OVS GHA support, noticed that jobs can run with
processors that don't have the same capabilities. For DPDK, this
impacts the ccache content since everything was built with
-march=native so far, and we will end up with binaries that can't run
in a later build. The problem has not been seen in Travis CI (?) but
it is safer to use a fixed "-Dmachine=default" in any case.
- Scheduling jobs is part of the configuration and takes the form of a
crontab. A build is scheduled every Monday at 0:00 (UTC) to provide a
default ccache for the week (useful for the ovsrobot).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-12-04 17:36:21 +00:00
|
|
|
- name: Install packages
|
|
|
|
run: sudo apt install -y ccache libnuma-dev python3-setuptools
|
2021-01-24 20:51:56 +00:00
|
|
|
python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev
|
|
|
|
libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev
|
2021-07-07 12:08:18 +00:00
|
|
|
libarchive-dev
|
2020-12-04 17:36:22 +00:00
|
|
|
- name: Install libabigail build dependencies if no cache is available
|
|
|
|
if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true'
|
|
|
|
run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev
|
|
|
|
libdw-dev
|
ci: hook to GitHub Actions
With the recent changes in terms of free access to the Travis CI, let's
offer an alternative with GitHub Actions.
Running jobs on ARM is not supported unless using external runners, so
this commit only adds builds for x86_64 and cross compiling for i386 and
aarch64.
Differences with the Travis CI integration:
- Error logs are not dumped to the console when something goes wrong.
Instead, they are gathered in a "catch-all" step and attached as
artifacts.
- A cache entry is stored once and for all, but if no cache is found you
can inherit from the default branch cache. The cache is 5GB large, for
the whole git repository.
- The maximum retention of logs and artifacts is 3 months.
- /home/runner is world writable, so a workaround has been added for
starting dpdk processes.
- Ilya, working on OVS GHA support, noticed that jobs can run with
processors that don't have the same capabilities. For DPDK, this
impacts the ccache content since everything was built with
-march=native so far, and we will end up with binaries that can't run
in a later build. The problem has not been seen in Travis CI (?) but
it is safer to use a fixed "-Dmachine=default" in any case.
- Scheduling jobs is part of the configuration and takes the form of a
crontab. A build is scheduled every Monday at 0:00 (UTC) to provide a
default ccache for the week (useful for the ovsrobot).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-12-04 17:36:21 +00:00
|
|
|
- name: Install i386 cross compiling packages
|
|
|
|
if: env.BUILD_32BIT == 'true'
|
|
|
|
run: sudo apt install -y gcc-multilib
|
|
|
|
- name: Install aarch64 cross compiling packages
|
|
|
|
if: env.AARCH64 == 'true'
|
|
|
|
run: sudo apt install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
|
|
|
|
pkg-config-aarch64-linux-gnu
|
2021-01-25 15:05:39 +00:00
|
|
|
- name: Install test tools packages
|
|
|
|
if: env.AARCH64 != 'true' || env.RUN_TESTS == 'true'
|
|
|
|
run: sudo apt install -y gdb
|
ci: hook to GitHub Actions
With the recent changes in terms of free access to the Travis CI, let's
offer an alternative with GitHub Actions.
Running jobs on ARM is not supported unless using external runners, so
this commit only adds builds for x86_64 and cross compiling for i386 and
aarch64.
Differences with the Travis CI integration:
- Error logs are not dumped to the console when something goes wrong.
Instead, they are gathered in a "catch-all" step and attached as
artifacts.
- A cache entry is stored once and for all, but if no cache is found you
can inherit from the default branch cache. The cache is 5GB large, for
the whole git repository.
- The maximum retention of logs and artifacts is 3 months.
- /home/runner is world writable, so a workaround has been added for
starting dpdk processes.
- Ilya, working on OVS GHA support, noticed that jobs can run with
processors that don't have the same capabilities. For DPDK, this
impacts the ccache content since everything was built with
-march=native so far, and we will end up with binaries that can't run
in a later build. The problem has not been seen in Travis CI (?) but
it is safer to use a fixed "-Dmachine=default" in any case.
- Scheduling jobs is part of the configuration and takes the form of a
crontab. A build is scheduled every Monday at 0:00 (UTC) to provide a
default ccache for the week (useful for the ovsrobot).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-12-04 17:36:21 +00:00
|
|
|
- name: Install doc generation packages
|
|
|
|
if: env.BUILD_DOCS == 'true'
|
|
|
|
run: sudo apt install -y doxygen graphviz python3-sphinx
|
|
|
|
python3-sphinx-rtd-theme
|
|
|
|
- name: Run setup
|
|
|
|
run: |
|
|
|
|
.ci/linux-setup.sh
|
|
|
|
# Workaround on $HOME permissions as EAL checks them for plugin loading
|
|
|
|
chmod o-w $HOME
|
|
|
|
- name: Build and test
|
|
|
|
run: .ci/linux-build.sh
|
|
|
|
- name: Upload logs on failure
|
|
|
|
if: failure()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: meson-logs-${{ join(matrix.config.*, '-') }}
|
|
|
|
path: |
|
|
|
|
build/meson-logs/testlog.txt
|
|
|
|
build/.ninja_log
|
|
|
|
build/meson-logs/meson-log.txt
|
2021-01-25 15:05:39 +00:00
|
|
|
build/gdb.log
|