Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI based on Github Actions #21

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: CI

on: [push, pull_request]

jobs:
build:
name: Build x86_64
runs-on: ubuntu-latest
container:
image: ubuntu:18.04 # use plain Ubuntu 18.04 instead of the Azure one
steps:
- name: Install build dependencies
run: |
set -x
apt-get update -q
apt-get install -y -q software-properties-common
add-apt-repository ppa:git-core/ppa
apt-get update -q
apt-get install -q -y git gcc-4.8 g++-4.8 make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev unzip wget
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40
update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-4.8 40
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 40

- name: Checkout v3d_external
uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0
path: v3d_external

- name: Checkout vaa3d_tools
uses: actions/checkout@v3
with:
repository: Vaa3D/vaa3d_tools
submodules: 'recursive'
fetch-depth: 0
path: vaa3d_tools

- name: Setup links
run: |
cd vaa3d_tools
ln -s ../v3d_external/v3d_main v3d_main
ln -s ../v3d_external/bin bin
cd ../v3d_external
ln -s ../vaa3d_tools/released_plugins released_plugins_more

- name: Build
run: |
set -x
cd v3d_external
./build.linux -j2
ls -la
ls -la bin

build-aarch64:
name: Build aarch64
runs-on: ubuntu-20.04

steps:
- name: Checkout v3d_external
uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0
path: v3d_external

- name: Checkout v3d_tools
uses: actions/checkout@v3
with:
repository: Vaa3D/vaa3d_tools
submodules: 'recursive'
fetch-depth: 0
path: vaa3d_tools

- name: Build
uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu18.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}:/v3d"
install: |
set -x
apt-get update -q -y
apt-get install -q -y gcc-4.8 g++-4.8 make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev unzip wget
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40
update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-4.8 40
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 40

run: |
set -x
ln -s /v3d/v3d_external/v3d_main /v3d/vaa3d_tools/v3d_main
ln -s /v3d/v3d_external/bin /v3d/vaa3d_tools/bin
ln -s /v3d/vaa3d_tools/released_plugins /v3d/v3d_external/released_plugins_more
cd /v3d/v3d_external
./build.linux -j2
ls -la
ls -la bin