feature build qemu in centos
Some checks failed
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Failing after 1m15s

This commit is contained in:
tqcq 2023-12-06 11:28:18 +08:00
parent 5f5d1fd414
commit ddf0679af0

View File

@ -48,19 +48,20 @@ jobs:
git fetch --depth=1 origin f5643914a9e8f79c606a76e6a9d7ea82a3fc3e65
git checkout f5643914a9e8f79c606a76e6a9d7ea82a3fc3e65
- name: install-qemu-build-deps
- name: build-qemu
if: steps.cache-qemu.outputs.cache-hit != 'true'
run: |
sudo apt-get update -y
sudo apt-get install -y autoconf automake autotools-dev ninja-build
- name: qemu
if: steps.cache-qemu.outputs.cache-hit != 'true'
run: |
cd qemu
./configure --target-list=arm-linux-user --prefix=$GITHUB_WORKSPACE/qemu-install
make -j `nproc`
make install
uses: addnab/docker-run-action@v3
with:
image: tqcq/hisi:centos
options: --rm --volumes-from ${{ env.JOB_CONTAINER_NAME }}
run: |
cd ${{ github.workspace }}
yum clean all
yum install -y libarchive cmake make gcc gcc-c++ openssl-devel autoconf libtool pkg-config
cd qemu
./configure --target-list=arm-linux-user --prefix=$GITHUB_WORKSPACE/qemu-install
make -j `nproc`
make install
- name: set-qemu-cache
uses: actions/cache/save@v3
@ -80,6 +81,13 @@ jobs:
yum install -y libarchive cmake make gcc gcc-c++ openssl-devel autoconf libtool pkg-config
cmake . -Bbuild -DCMAKE_TOOLCHAIN_FILE=toolchains/hisiv500.toolchain.cmake -DULIB_BUILD_TESTS=ON -DCMAKE_CROSSCOMPILING_EMULATOR="qemu-arm;-L;/opt/hisi-linux/x86-arm/arm-hisiv500-linux/"
cmake --build build --target all -- -j `nproc`
- name: test-in-centos
uses: addnab/docker-run-action@v3
with:
image: tqcq/hisi:centos
options: --rm --volumes-from ${{ env.JOB_CONTAINER_NAME }}
run: |
cd ${{ github.workspace }}
export PATH=${{ github.workspace }}/qemu-install/bin:$PATH
cd build && ctest --output-on-failure -j `nproc`