Skip to content

Commit

Permalink
Update CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wh201906 committed Nov 22, 2023
1 parent 68adc35 commit 6b589d8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/build-linux-multi-arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ env:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}

strategy:
matrix:
include:
- arch: armv7
distro: ubuntu20.04
distro: ubuntu22.04
- arch: aarch64
distro: ubuntu20.04
distro: ubuntu22.04
- arch: riscv64
distro: ubuntu20.04
distro: ubuntu22.04

steps:
- name: Checkout repo
Expand All @@ -40,26 +40,17 @@ jobs:
tar -xzf QCustomPlot-source.tar.gz
cp qcustomplot-source/qcustomplot.* ${{ env.SOURCE_DIR }}/src
- name: Install Qt
run: |
sudo apt-get -q -y update
sudo apt-get -q -y install git build-essential
sudo apt-get -q -y install qt5-default libqt5serialport5-dev qtconnectivity5-dev
- name: Create build directory
run: |
mkdir ${{ runner.temp }}/shadow_build_dir
- name: Build
uses: uraimo/run-on-arch-action@v2.5.1
uses: uraimo/run-on-arch-action@v2.6.0
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}

# Not required, but speeds up builds
githubToken: ${{ github.token }}

# Create an artifacts directory
# setup: |
# mkdir -p "${PWD}/artifacts"
Expand All @@ -85,14 +76,14 @@ jobs:
install: |
apt-get update -q -y
apt-get install -q -y git build-essential
apt-get install -q -y qt5-default libqt5serialport5-dev qtconnectivity5-dev
apt-get install -q -y qtbase5-dev qt5-qmake libqt5serialport5-dev qtconnectivity5-dev
# Produce a binary artifact and place it in the mounted volume
run: |
cd /shadow_build_dir
export JOBS=$(nproc)
export QT_SELECT=qt5
qmake -r /shadow_src_dir/src/SerialTest.pro
make -j$JOBS && make clean
make -j$((`nproc` + 1)) && make clean
- name: Save artifact
uses: actions/upload-artifact@master
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ jobs:
- name: Build
working-directory: ${{ runner.temp }}/shadow_build_dir
run: |
export JOBS=$((`sysctl -n hw.ncpu`+1))
qmake -r ${{ env.SOURCE_DIR }}/src/SerialTest.pro CONFIG+=app_bundle
make -j$JOBS
make -j$((`sysctl -n hw.ncpu` + 1))
- name: Generate DMG file
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Build
run: |
qmake -r ./src/SerialTest.pro
make -j $(nproc)
make -j $((`nproc` + 1))
make clean
- name: Copy DLLs
Expand Down

0 comments on commit 6b589d8

Please sign in to comment.