mirror of https://github.com/fwbuilder/fwbuilder
chore: Configure GitHub actions
This commit is contained in:
parent
f3a865f6a3
commit
8d879e47b4
|
@ -0,0 +1,54 @@
|
|||
name: Linux
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
debug-unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {
|
||||
id: 'ubuntu-20.04',
|
||||
name: "Ubuntu 20.04",
|
||||
docker_image: "fwbuilder/ubuntu:20.04",
|
||||
unit_tests: true
|
||||
}
|
||||
- {
|
||||
id: 'ubuntu-18.04',
|
||||
name: "Ubuntu 18.04",
|
||||
docker_image: "fwbuilder/ubuntu:18.04",
|
||||
unit_tests: true
|
||||
}
|
||||
- {
|
||||
id: 'ubuntu-16.04',
|
||||
name: "Ubuntu 16.04",
|
||||
docker_image: "fwbuilder/ubuntu:16.04",
|
||||
unit_tests: false
|
||||
}
|
||||
container:
|
||||
image: ${{ matrix.config.docker_image }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ matrix.config.id }}-ccache-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ matrix.config.id }}-ccache
|
||||
- name: Configure
|
||||
run: |
|
||||
mkdir -p build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
||||
- name: Build
|
||||
run: |
|
||||
cd build
|
||||
make -j$(nproc)
|
||||
make install
|
||||
- name: Run unit tests
|
||||
if: ${{ matrix.config.unit_tests == true }}
|
||||
run: |
|
||||
cd build
|
||||
QT_QPA_PLATFORM=vnc ctest --verbose
|
|
@ -0,0 +1,33 @@
|
|||
name: macOS
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
release-build:
|
||||
runs-on: macos-10.15
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew install qt net-snmp ccache
|
||||
brew upgrade openssl cmake
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ runner.os }}-ccache-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ccache
|
||||
- name: Configure
|
||||
run: |
|
||||
export PATH="/usr/local/opt/qt/bin:/usr/local/opt/net-snmp/bin:$PATH"
|
||||
export OPENSSL_ROOT_DIR="/usr/local/opt/openssl" ;
|
||||
mkdir -p build && cd build
|
||||
cmake ..
|
||||
- name: Build
|
||||
run: |
|
||||
export PATH="/usr/local/opt/qt/bin:/usr/local/opt/net-snmp/bin:$PATH"
|
||||
export OPENSSL_ROOT_DIR="/usr/local/opt/openssl" ;
|
||||
cd build
|
||||
make -j$(sysctl -n hw.ncpu) install
|
|
@ -0,0 +1,37 @@
|
|||
name: w32-mxe
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
release-build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {
|
||||
id: "mxe-qt-5.12",
|
||||
name: "MXE Qt 5.12",
|
||||
docker_image: "fwbuilder/mxe:qt-5.12"
|
||||
}
|
||||
container:
|
||||
image: ${{ matrix.config.docker_image }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ matrix.config.id }}-ccache-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ matrix.config.id }}-ccache
|
||||
- name: Configure
|
||||
run: |
|
||||
export PATH=$PATH:/opt/mxe/usr/bin
|
||||
mkdir -p build && cd build
|
||||
i686-w64-mingw32.shared-cmake ..
|
||||
- name: Build
|
||||
run: |
|
||||
export PATH=$PATH:/opt/mxe/usr/bin
|
||||
cd build
|
||||
make -j$(nproc)
|
Loading…
Reference in New Issue