Project build and dependency cleanup #591
Workflow file for this run
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
name: ubuntu packaging | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CONFIGURATION_DIRECTORY: ${{ github.workspace }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: ubuntu packaging | |
runs-on: ubuntu-22.04 | |
container: ghcr.io/skaginn3x/skaginn3x/framework/tfc-toolchain:sha-a9cc12c | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [debug, release] | |
architecture: [ x86_64, aarch64 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: start dbus | |
run: | | |
dbus-daemon --system | |
apt-get update | |
apt-get upgrade -y | |
- name: Restore artifacts, or setup vcpkg (do not install any package) | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgDirectory: '/opt/vcpkg' | |
vcpkgGitCommitId: 'fbc868ee5e12e3e81f464104be246ec06553c274' | |
vcpkgJsonGlob: 'vcpkg.json' | |
- name: Run CMake consuming CMakePreset.json and vcpkg.json by mean of vcpkg. | |
if: matrix.architecture == 'x86_64' | |
uses: lukka/[email protected] | |
with: | |
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | |
workflowPreset: 'packflow-gcc-${{matrix.build_type}}' | |
- name: Pack it aarch64 | |
if: matrix.architecture == 'aarch64' | |
uses: lukka/[email protected] | |
with: | |
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | |
workflowPreset: 'packflow-aarch64-gcc-${{matrix.build_type}}' | |
- name: Upload vcpkg log | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vcpkg-build-fail-logs | |
path: /opt/vcpkg/**/*out.log | |
- name: Upload vcpkg log | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vcpkg-build-fail-logs | |
path: /opt/vcpkg/**/*err.log | |
- name: Test install | |
if: matrix.architecture == 'x86_64' | |
run: | | |
apt-get update | |
apt-get install -y ./build/pack-gcc-${{matrix.build_type}}/*.deb | |
- name: Upload debian package | |
if: matrix.architecture == 'x86_64' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tfc-framework-${{matrix.build_type}} | |
path: build/pack-gcc-${{matrix.build_type}}/*.deb | |
- name: Upload rpm package | |
if: matrix.architecture == 'x86_64' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tfc-framework-${{matrix.build_type}} | |
path: build/pack-gcc-${{matrix.build_type}}/*.rpm | |
- name: Upload tar package | |
if: matrix.architecture == 'x86_64' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tfc-framework-${{matrix.build_type}} | |
path: build/pack-gcc-${{matrix.build_type}}/*.tar.gz | |
- name: Upload debian package | |
if: matrix.architecture == 'aarch64' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tfc-framework-${{matrix.build_type}} | |
path: build/pack-aarch64-gcc-${{matrix.build_type}}/*.deb | |
- name: Upload rpm package | |
if: matrix.architecture == 'aarch64' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tfc-framework-${{matrix.build_type}} | |
path: build/pack-aarch64-gcc-${{matrix.build_type}}/*.rpm | |
- name: Upload tar package | |
if: matrix.architecture == 'aarch64' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tfc-framework-${{matrix.build_type}} | |
path: build/pack-aarch64-gcc-${{matrix.build_type}}/*.tar.gz |