You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.2 KiB
67 lines
2.2 KiB
name: dvmhost-build-dpkg
|
|
|
|
# Controls when the workflow will run
|
|
on:
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
jobs:
|
|
# This workflow contains a single job called "build"
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get branch name
|
|
id: branch-name
|
|
uses: tj-actions/branch-names@v5.1
|
|
- name: Get current date
|
|
id: date
|
|
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
|
|
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Dependencies
|
|
run: sudo apt-get install -y gcc-arm-none-eabi build-essential devscripts debhelper libasio-dev
|
|
|
|
- name: Sync Git Submodules
|
|
run: git submodule init && git submodule update
|
|
|
|
- name: Generate build files with CMake
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
|
|
|
- name: Build binaries
|
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j $(nproc)
|
|
|
|
- name: Change /opt Permissions
|
|
run: sudo chmod 777 /opt
|
|
|
|
- name: Build Debian Package
|
|
run: |
|
|
cd ${{github.workspace}}/build
|
|
cpack
|
|
|
|
- name: Package Hash
|
|
run: |
|
|
echo "BRANCH: ${{steps.branch-name.outputs.current_branch}}" >> release.txt
|
|
echo "COMMIT: ${{github.sha}}" >> release.txt
|
|
echo >> release.txt
|
|
echo '```' >> release.txt
|
|
cat << EOF >> release.txt
|
|
dvmhost_3.0.0-1_amd64.deb
|
|
size : $(wc -c dvmhost_3.0.0-1_amd64.deb)
|
|
md5 : $(md5sum dvmhost_3.0.0-1_amd64.deb)
|
|
sha1 : $(sha1sum dvmhost_3.0.0-1_amd64.deb)
|
|
sha256: $(sha256sum dvmhost_3.0.0-1_amd64.deb)
|
|
EOF
|
|
echo '```' >> release.txt
|
|
|
|
- name: Release Artifacts
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
tag_name: ${{steps.date.outputs.date}}
|
|
body_path: release.txt
|
|
files: |
|
|
dvmhost_3.0.0-1_amd64.deb
|