Skip to content

Commit

Permalink
Ci build (#5)
Browse files Browse the repository at this point in the history
* Add build.yml as in patchmanager

* SDK 4.3
  • Loading branch information
b100dian authored Dec 28, 2022
1 parent 96f665e commit ada453f
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Github CI build

on:
push:
tags:
- '*'
pull_request:
branches:
- master
- patchmanager3

env:
RELEASE: 4.3.0.12

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Prepare
run: mkdir output

- name: Build armv7hl
run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c "
mkdir -p build ;
cd build ;
cp -r /share/* . ;
mb2 -t SailfishOS-$RELEASE-armv7hl build --enable-debug ;
sudo cp -r RPMS/*.rpm /share/output"

- name: Build aarch64
run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c "
mkdir -p build ;
cd build ;
cp -r /share/* . ;
mb2 -t SailfishOS-$RELEASE-aarch64 build --enable-debug ;
sudo cp -r RPMS/*.rpm /share/output"

- name: Build i486
run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c "
mkdir -p build ;
cd build ;
cp -r /share/* . ;
mb2 -t SailfishOS-$RELEASE-i486 build --enable-debug ;
sudo cp -r RPMS/*.rpm /share/output"

- name: Upload build result
uses: actions/upload-artifact@v2
with:
name: output-rpms
path: output

- name: Create release
if: contains(github.ref, 'release')
run: |
set -x
assets=()
for asset in output/*.rpm; do
assets+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
harbour-sailslack.pro.user
.qmake.conf
build/

0 comments on commit ada453f

Please sign in to comment.