Skip to content

Commit

Permalink
Add Github CI build workflow
Browse files Browse the repository at this point in the history
Three basic workflow jobs, each cross-compiling arm64, armel
and armhf.
  • Loading branch information
rfinnie committed Jun 24, 2020
1 parent f97b1af commit 82ee658
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 82ee658

Please sign in to comment.