Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test cpack artifact uploads #92

Merged
merged 18 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: pacman -S --noconfirm git cmake extra-cmake-modules qt5-tools kwin wireplumber

- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Expand All @@ -42,7 +42,7 @@ jobs:

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j

# - name: Test
# working-directory: ${{github.workspace}}/build
Expand Down
31 changes: 26 additions & 5 deletions .github/workflows/debian12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
BUILD_TYPE: Release

jobs:
debian-12:
debian12:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
Expand All @@ -27,23 +27,44 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Refresh Debian Packages
run: apt update && apt -y dist-upgrade
continue-on-error: true

- name: Install Dependencies
run: apt -y install cmake g++ gettext extra-cmake-modules qttools5-dev libkf5configwidgets-dev kwin-dev
run: |
apt -y install cmake g++ gettext extra-cmake-modules qttools5-dev libkf5configwidgets-dev kwin-dev
apt -y install dpkg-dev file

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake . -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: cmake --build . --config ${{env.BUILD_TYPE}} -j

- id: package
name: Package
if: github.event_name != 'schedule'
run: |
cpack -V -G DEB
DEB_NAME=kwin4_effect_shapecorners
SHORT_SHA=$(echo $GITHUB_SHA | head -c 5)
mkdir artifacts
mv ${DEB_NAME}.deb artifacts/${DEB_NAME}_${GITHUB_JOB}_${SHORT_SHA}.deb

- name: Upload Artifact
uses: actions/[email protected]
if: github.event_name != 'schedule'
with:
name: Deb Package
path: ./artifacts/
compression-level: 0
if-no-files-found: error

# - name: Test
# working-directory: ${{github.workspace}}/build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/glslangValidator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Dependencies
run: sudo apt update && sudo apt install -y glslang-tools
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/kubuntu2204-backports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
BUILD_TYPE: Release

jobs:
ubuntu2204-backports:
kubuntu2204:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
Expand All @@ -24,7 +24,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run github-actions-tune
uses: abbbi/github-actions-tune@v1
Expand All @@ -44,11 +44,30 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake . -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: cmake --build . --config ${{env.BUILD_TYPE}} -j

- id: package
name: Package
if: github.event_name != 'schedule'
run: |
cpack -V -G DEB
DEB_NAME=kwin4_effect_shapecorners
SHORT_SHA=$(echo $GITHUB_SHA | head -c 5)
mkdir artifacts
mv ${DEB_NAME}.deb artifacts/${DEB_NAME}_${GITHUB_JOB}_${SHORT_SHA}.deb

- name: Upload Artifact
uses: actions/[email protected]
if: github.event_name != 'schedule'
with:
name: Deb Package
path: ./artifacts/
compression-level: 0
if-no-files-found: error

# - name: Test
# working-directory: ${{github.workspace}}/build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/neon-unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j

# - name: Test
# working-directory: ${{github.workspace}}/build
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/neon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
BUILD_TYPE: Release

jobs:
neon-user:
neon:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
Expand All @@ -27,7 +27,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Refresh KDE Neon Packages
run: apt update && apt -y dist-upgrade
Expand All @@ -39,11 +39,30 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake . -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: cmake --build . --config ${{env.BUILD_TYPE}} -j

- id: package
name: Package
if: github.event_name != 'schedule'
run: |
cpack -V -G DEB
DEB_NAME=kwin4_effect_shapecorners
SHORT_SHA=$(echo $GITHUB_SHA | head -c 5)
mkdir artifacts
mv ${DEB_NAME}.deb artifacts/${DEB_NAME}_${GITHUB_JOB}_${SHORT_SHA}.deb

- name: Upload Artifact
uses: actions/[email protected]
if: github.event_name != 'schedule'
with:
name: Deb Package
path: ./artifacts/
compression-level: 0
if-no-files-found: error

# - name: Test
# working-directory: ${{github.workspace}}/build
Expand Down
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.20)

project(kwin4_effect_shapecorners)
project(kwin4_effect_shapecorners VERSION 0.6.2)

set(KF_MIN_VERSION "5.78")
set(QT_MIN_VERSION "5.15")
Expand Down Expand Up @@ -76,13 +76,14 @@ set_property (TEST KWinEffectSupport PROPERTY PASS_REGULAR_EXPRESSION "true")


# these are cache variables, so they could be overwritten with -D,
set(CPACK_PACKAGE_NAME kwin4-effect-shapecorners
CACHE STRING kwin4-effect-shapecorners
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME}
CACHE STRING ${CMAKE_PROJECT_NAME}
)
set(CPACK_DEBIAN_FILE_NAME "kwin4-effect-shapecorners-kubuntu2204-amd64.deb")
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
set(CPACK_DEBIAN_PACKAGE_VERSION "${CMAKE_PROJECT_VERSION}")
set(CPACK_DEBIAN_FILE_NAME "${CMAKE_PROJECT_NAME}.deb")
set(CPACK_PACKAGE_CONTACT "[email protected]")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Matin Lotfaliei")
set(CPACK_DEBIAN_PACKAGE_VERSION "0.3.0")

# autogenerate dependency information
set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
Expand Down