-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-clang format -build and publish debug -build and publish release Signed-off-by: Joel Winarske <[email protected]>
- Loading branch information
Showing
3 changed files
with
148 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: appstream-parser | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, synchronize, reopened, closed ] | ||
release: | ||
types: [ published, created, edited ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
appstream-parser: | ||
|
||
env: | ||
VERSION: 0.0.1 | ||
|
||
strategy: | ||
matrix: | ||
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04 ] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 1 | ||
|
||
- name: Install packages | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install libflatpak-dev libxml2-dev zlib1g-dev flatpak | ||
echo "flatpak list" | ||
flatpak list | ||
- name: Configure Debug | ||
run: | | ||
mkdir -p ${{github.workspace}}/build/debug | ||
cmake ${{github.workspace}} -B ${{github.workspace}}/build/debug | ||
- name: Build Debug | ||
working-directory: ${{github.workspace}}/build/debug | ||
run: | | ||
rm -rf _packages || true | ||
make package -j | ||
ls -la _packages | ||
- name: Configure Release | ||
run: | | ||
mkdir -p ${{github.workspace}}/build/release | ||
cmake ${{github.workspace}} -B ${{github.workspace}}/build/release | ||
- name: Build Release Package | ||
working-directory: ${{github.workspace}}/build/release | ||
run: | | ||
rm -rf _packages || true | ||
make package -j | ||
ls -la _packages | ||
echo "Release Info" | ||
ls -la appstream_parser | ||
echo "Strip executable" | ||
strip appstream_parser | ||
ls -la appstream_parser | ||
echo "List Dependencies" | ||
ldd appstream_parser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# | ||
# Copyright 2020 Toyota Connected North America | ||
# Copyright 2024 Joel Winarske | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
set(CPACK_GENERATOR "TGZ;RPM;DEB") | ||
|
||
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") | ||
set(CPACK_PACKAGE_NAME ${EXE_OUTPUT_NAME}-dbg) | ||
else () | ||
set(CPACK_PACKAGE_NAME ${EXE_OUTPUT_NAME}) | ||
endif () | ||
|
||
set(CPACK_DEFAULT_PACKAGE_DESCRIPTION_SUMMARY "${EXE_OUTPUT_NAME} - ${CMAKE_BUILD_TYPE}") | ||
set(CPACK_PACKAGE_VENDOR "Joel Winarske") | ||
set(CPACK_PACKAGE_CONTACT "[email protected]") | ||
|
||
set(CPACK_VERBATIM_VARIABLES YES) | ||
|
||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) | ||
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_BINARY_DIR}/_packages") | ||
|
||
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE) | ||
|
||
set(CPACK_DEB_COMPONENT_INSTALL YES) | ||
|
||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Joel Winarske <[email protected]>") | ||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS NO) | ||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) | ||
|
||
set(CPACK_RPM_COMPONENT_INSTALL YES) | ||
set(CPACK_RPM_FILE_NAME RPM-DEFAULT) | ||
set(CPACK_RPM_PACKAGE_LICENSE "Apache-2.0") | ||
set(CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}") | ||
set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_DEFAULT_PACKAGE_DESCRIPTION_SUMMARY}") | ||
|
||
set(CPACK_TGZ_FILE_NAME TGZ-DEFAULT) | ||
|
||
if (${CMAKE_BUILD_TYPE} STREQUAL "Release") | ||
set(CPACK_STRIP_FILES ${EXE_OUTPUT_NAME}) | ||
endif () | ||
|
||
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") | ||
set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) | ||
set(CMAKE_RPM_DEBUGINFO_PACKAGE ON) | ||
set(CMAKE_TGZ_DEBUGINFO_PACKAGE ON) | ||
endif () | ||
|
||
include(CPack) |