You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
name: C/C++ CI linux cross compilation arm64/armhf/mips
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
buildtype: [Debug, Release]
|
|
include:
|
|
- system: arm64
|
|
crosscompiler: aarch64-linux-gnu
|
|
- system: armhf
|
|
crosscompiler: arm-linux-gnueabihf
|
|
- system: mips
|
|
crosscompiler: mips-linux-gnu
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: pkg
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends ca-certificates xz-utils cmake make pkg-config git g++-${{ matrix.crosscompiler }}
|
|
|
|
- name: build
|
|
run: |
|
|
cmake -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.system }} -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=${{ matrix.crosscompiler }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.crosscompiler }}-g++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DCMAKE_FIND_ROOT_PATH=/usr/aarch64-linux-gnu .
|
|
make
|
|
|
|
- name: cpack
|
|
run: |
|
|
cpack
|
|
echo "artifactPath=$(ls *.deb)" >> $GITHUB_ENV
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ env.artifactPath }}
|
|
path: ${{ env.artifactPath }} |