Skip to content

Commit

Permalink
Merge pull request #88 from minhanghuang/dev-script
Browse files Browse the repository at this point in the history
chore(script): update install.py
  • Loading branch information
minhanghuang authored Jan 19, 2025
2 parents 16f0765 + e425b85 commit 5146eb9
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 8 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/manually-ubuntu20.04-arrch64-v10.0.0-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: manually ubuntu20.04 v10.0.0 build arrch64
run-name: manually ubuntu20 arrch64

on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'

jobs:
build-arm-ubuntu20:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
name: Run commands
env:
DEBIAN_FRONTEND: noninteractive
id: runcmd
with:
arch: aarch64
distro: ubuntu20.04

install: |
apt update
apt install -y lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
run: |
echo "-----------------------"
uname -a
lsb_release -a
echo "-----------------------"
echo "Log level: ${{ github.event.inputs.logLevel }}"
echo "Tags: ${{ github.event.inputs.tags }}"
echo "Inputs: ${{ toJson(github.event.inputs) }}"
bash -c "python3 install.py && source install/setup.bash && mkdir -p build && cd build && cmake .. && make -j$(nproc)"
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu18-v10.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
apt update
apt install -y lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
apt install -y sudo lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
python3 install.py
- name: Build
Expand Down
19 changes: 12 additions & 7 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,16 @@ def _clone_gcc(self):
except Exception as e:
print("gcc error: {}".format(e))

self._cmd("apt update")
self._cmd("apt install -y software-properties-common")
self._cmd("add-apt-repository -y ppa:ubuntu-toolchain-r/test")
self._cmd("apt update")
self._cmd("apt install -y gcc-9 g++-9")
self._cmd("update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100")
self._cmd("update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100")
self._cmd("sudo apt update")
self._cmd("sudo apt install -y software-properties-common")
self._cmd("sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test")
self._cmd("sudo apt update")
self._cmd("sudo apt install -y gcc-9 g++-9")
self._cmd("sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100")
self._cmd("sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100")
self._cmd("sudo ldconfig")
self._cmd("gcc --version")
self._cmd("g++ --version")
return None

def _clone_cmake(self):
Expand All @@ -131,6 +134,8 @@ def _clone_cmake(self):
self._cmd("cp -r cmake-3.22.0-linux-x86_64/doc/* /usr/local/doc")
self._cmd("cp -r cmake-3.22.0-linux-x86_64/share/* /usr/local/share")
self._cmd("rm -rf cmake-3.22.0-linux-x86_64*")
self._cmd("sudo ldconfig")
self._cmd("cmake --version")
os.chdir(self._current_path)
return None

Expand Down

0 comments on commit 5146eb9

Please sign in to comment.