-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80419d7
commit 19d0851
Showing
5 changed files
with
203 additions
and
149 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
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,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeo pipefail | ||
|
||
# Repository | ||
readonly repo=${REPO:?input REPO is required} | ||
# Release number | ||
readonly version=${VERSION:?input TARGET is required} | ||
# Build target | ||
readonly target=${TARGET:?input TARGET is required} | ||
|
||
BUILD_TYPE=RELEASE make "$target" | ||
|
||
readonly out=$GITHUB_WORKSPACE | ||
readonly repo_name=${repo#*/} | ||
readonly archive_lib=$out/$repo_name-$version-$target.zip | ||
readonly archive_deb=$out/$repo_name-$version-$target-deb-pkgs.zip | ||
readonly archive_rpm=$out/$repo_name-$version-$target-rpm-pkgs.zip | ||
readonly archive_examples=$out/$repo_name-$version-$target-examples.zip | ||
|
||
cd crossbuilds/"$target" | ||
zip -r "$archive_lib" lib | ||
cd - | ||
zip -r "$archive_lib" include | ||
|
||
cd crossbuilds/"$target"/packages | ||
zip "$archive_deb" ./*.deb | ||
zip "$archive_rpm" ./*.rpm | ||
cd - | ||
|
||
cd crossbuilds/"$archive_examples"/examples | ||
zip "$archive_examples" ./* | ||
cd - | ||
|
||
archive_paths=$(printf '%s\n' "$archive_lib") | ||
archive_paths+=$(printf '%s\n' "$archive_deb") | ||
archive_paths+=$(printf '%s\n' "$archive_rpm") | ||
archive_paths+="$archive_examples" | ||
|
||
echo "archive-name=$repo_name-$version-$target.zip" | ||
echo "archive-paths=$archive_paths" |
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,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeo pipefail | ||
|
||
# Repository | ||
readonly repo=${REPO:?input REPO is required} | ||
# Release number | ||
readonly version=${VERSION:?input VERSION is required} | ||
|
||
BUILD_TYPE=RELEASE make | ||
|
||
readonly out=$GITHUB_WORKSPACE | ||
readonly repo_name=${repo#*/} | ||
readonly archive_lib=$out/$repo_name-$version-macos-x64.zip | ||
readonly archive_examples=$out/$repo_name-$version-macos-x64-examples.zip | ||
|
||
cd build | ||
zip -r "$archive_lib" lib | ||
cd .. | ||
zip -r "$archive_lib" include | ||
|
||
cd build/examples | ||
zip "$archive_examples" ./* | ||
cd .. | ||
|
||
archive_paths=$(printf '%s\n' "$archive_lib") | ||
archive_paths+="$archive_examples" | ||
|
||
echo "archive-name=$repo_name-$version-macos-x64.zip" | ||
echo "archive-paths=$archive_paths" |
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,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeo pipefail | ||
|
||
# Release number | ||
readonly version=${VERSION:-input VERSION is required} | ||
# Git actor name | ||
readonly git_user_name=${GIT_USER_NAME:?input GIT_USER_NAME is required} | ||
# Git actor email | ||
readonly git_user_email=${GIT_USER_EMAIL:?input GIT_USER_EMAIL is required} | ||
|
||
export GIT_AUTHOR_NAME=$git_user_name | ||
export GIT_AUTHOR_EMAIL=$git_user_email | ||
export GIT_COMMITTER_NAME=$git_user_name | ||
export GIT_COMMITTER_EMAIL=$git_user_email | ||
|
||
# Bump CMake project version | ||
printf '%s' "$version" > version.txt | ||
|
||
git commit version.txt -m "chore: Bump version to $version" | ||
git tag "$version" -m "v$version" | ||
git log -10 | ||
git show-ref --tags | ||
git push origin | ||
git push origin "$version" |
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,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeo pipefail | ||
|
||
# Extract cross-compilation targets from the Makefile | ||
crossbuild_targets=$(sed -n 's/^CROSSBUILD_TARGETS=\(.*\)/\1/p' GNUmakefile | head -n1) | ||
target_matrix="{\"target\": [\"${crossbuild_targets// /\",\"}\"]}" | ||
echo "build-linux-matrix=$target_matrix" >> "$GITHUB_OUTPUT" |