From 82ee6585343ab389b8895a9140f18a9a75d5a6ce Mon Sep 17 00:00:00 2001 From: Ryan Finnie Date: Tue, 23 Jun 2020 16:45:21 -0700 Subject: [PATCH] Add Github CI build workflow Three basic workflow jobs, each cross-compiling arm64, armel and armhf. --- .github/workflows/ci.yml | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..abc6ff5db --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,60 @@ +name: ci +on: [push, pull_request] +jobs: + build-arm64: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Dependency packages + run: sudo apt-get -y install build-essential cmake gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross + - name: cmake + run: cmake -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DARM64=ON + - name: make + run: make -j2 + - name: make install + run: mkdir -p ${GITHUB_WORKSPACE}/destdir && make install DESTDIR=${GITHUB_WORKSPACE}/destdir + - name: Build tarball + run: mkdir -p ${GITHUB_WORKSPACE}/artifacts && tar zcvf ${GITHUB_WORKSPACE}/artifacts/${{ github.job }}-${{ github.run_id }}.${{ github.run_number }}.tar.gz -C ${GITHUB_WORKSPACE}/destdir . + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: userland-ci-${{ github.job }}-${{ github.run_id }}.${{ github.run_number }} + path: artifacts/*.tar.gz + build-armel: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Dependency packages + run: sudo apt-get -y install build-essential cmake gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libc6-dev-armel-cross + - name: cmake + run: cmake -DCMAKE_C_COMPILER=arm-linux-gnueabi-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabi-g++ -DARM64=OFF + - name: make + run: make -j2 + - name: make install + run: mkdir -p ${GITHUB_WORKSPACE}/destdir && make install DESTDIR=${GITHUB_WORKSPACE}/destdir + - name: Build tarball + run: mkdir -p ${GITHUB_WORKSPACE}/artifacts && tar zcvf ${GITHUB_WORKSPACE}/artifacts/${{ github.job }}-${{ github.run_id }}.${{ github.run_number }}.tar.gz -C ${GITHUB_WORKSPACE}/destdir . + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: userland-ci-${{ github.job }}-${{ github.run_id }}.${{ github.run_number }} + path: artifacts/*.tar.gz + build-armhf: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Dependency packages + run: sudo apt-get -y install build-essential cmake gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-cross + - name: cmake + run: cmake -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DARM64=OFF + - name: make + run: make -j2 + - name: make install + run: mkdir -p ${GITHUB_WORKSPACE}/destdir && make install DESTDIR=${GITHUB_WORKSPACE}/destdir + - name: Build tarball + run: mkdir -p ${GITHUB_WORKSPACE}/artifacts && tar zcvf ${GITHUB_WORKSPACE}/artifacts/${{ github.job }}-${{ github.run_id }}.${{ github.run_number }}.tar.gz -C ${GITHUB_WORKSPACE}/destdir . + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: userland-ci-${{ github.job }}-${{ github.run_id }}.${{ github.run_number }} + path: artifacts/*.tar.gz