Initial checkin of Pika from heckimp

This commit is contained in:
2023-09-25 15:35:21 -07:00
commit 891e999216
6761 changed files with 5240685 additions and 0 deletions

View File

@ -0,0 +1,32 @@
#!/usr/bin/python3
# Equivalent to:
# configure_file(input: src,
# output: name / src,
# copy: true,
# install_dir: pikaplugindir / 'plug-ins' / name,
# install_mode: 'rwxr-xr-x')
# Except that configure_file() does not accept output in a subdirectory. So we
# use this wrapper for now.
# See: https://github.com/mesonbuild/meson/issues/2320
import os
import shutil
import stat
import sys
src_file = sys.argv[1]
dir_name = sys.argv[2]
dummy_path = None
if len(sys.argv) > 3:
dummy_path = sys.argv[3]
os.makedirs(dir_name, exist_ok=True)
file_name = os.path.basename(src_file)
dst_file = os.path.join(dir_name, file_name)
shutil.copyfile(src_file, dst_file)
os.chmod(dst_file, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
if dummy_path is not None:
# Just touch the dummy file.
open(dummy_path, mode='w').close()

View File

@ -0,0 +1,41 @@
<!-- ⚠️ IMPORTANT: READ ME! ⚠️
This is the default template for bug reports.
For feature requests or performance issues, please switch instead to the appropriate template in the "Choose a template" list.
It is important that you fill all the fields of the template.
-->
### Environment/Versions
- PIKA version:
- Package: <!--[flatpak? Installer from https://heckin.technology/AlderconeStudio/PIKApp? If another installer, tell us where from] (write it after the > symbol)-->
- Operating System: <!--[Windows? macOS? Linux? All?] (write it after the > symbol) -->
<!--Note: bug reporters are expected to have verified the bug still exists
either in the last stable version of PIKA or on updated development code
(master branch).-->
### Description of the bug
<!--Please describe your issue with details.
Add screenshot or other files if needed.(write it after the > symbol)-->
### Reproduction
Is the bug reproducible? <!--[Always / Randomly / Happened only once ] (write it after the > symbol)-->
Reproduction steps:
1.
2.
3.
Expected result:
Actual result:
### Additional information
If you have a backtrace for a crash or a warning, paste it here.

View File

@ -0,0 +1,15 @@
**Operating System:** <!--[Windows? macOS? Linux? All?] (write it after the > symbol) -->
### Description of the feature
<!-- Please describe your feature with details.
Add screenshots, design images or other files which would help for
understanding the feature or for implementation.
Also add links when needed, for instance for implementation standards
or other relevant resources.-->
### Use cases
<!-- If not obvious, explain the use cases or problems to solve. -->

View File

@ -0,0 +1,34 @@
### Environment/Versions
- PIKA Version:
- Package: <!--[flatpak? Installer from https://heckin.technology/AlderconeStudio/PIKApp? If another installer, tell us where from] (write it after the > symbol)-->
- Operating System: <!--[Windows? macOS? Linux? All?] (write it after the > symbol) -->
<!-- Note: bug reporters are expected to have verified the bug still exists
either in the last stable version of PIKA or on updated development code
(master branch). -->
### Issue Description
<!-- Please provide a general description of the issue. -->
### Performance Log
<!-- Please record a performance log demonstrating the issue, and attach it to the report.
For more information, see
https://developer.pika.org/core/debug/performance-logs/
-->
### Performance Log Description
<!-- Please describe in detail the actions performed in the performance log.
If you added empty event markers to the log, please provide a description for them here.
If you recorded a screencast while recording the log, please attach it here. -->
### Additional Information
<!-- If there is any additional information, please provide it here. -->
/label ~"1. Performance"

View File

@ -0,0 +1,15 @@
Contribution guidelines:
- Follow our coding style, which is mostly the GNU coding style
with some specificities: see [Coding Style](https://developer.pika.org/core/coding_style/).
- Make sure no trailing spaces or tabs are left out.
- Check the following option when making your request:
"*Allow commits from members who can merge to the target branch.*"
- Enable the container registry for your repository by following this
documentation, but enabling the feature instead of disabling it
(unlike what the docs says, Container Registry is disabled by default
on our Gitlab instance):
https://docs.gitlab.com/ee/user/packages/container_registry/#disable-the-container-registry-for-a-project

View File

@ -0,0 +1,30 @@
#!/bin/bash
set -e
ancestor_horizon=28 # days (4 weeks)
echo ""
echo "This script may be wrong. You may disregard it if it conflicts with"
echo "https://gitlab.gnome.org/GNOME/pika/-/blob/master/CODING_STYLE.md"
clang-format --version
# Wrap everything in a subshell so we can propagate the exit status.
(
source .gitlab/search-common-ancestor.sh
git diff -U0 --no-color "${newest_common_ancestor_sha}" | clang-format-diff -p1 > format-diff.log
)
exit_status=$?
[ ${exit_status} == 0 ] || exit ${exit_status}
format_diff="$(<format-diff.log)"
if [ -n "${format_diff}" ]; then
cat format-diff.log
exit 1
fi

View File

@ -0,0 +1,39 @@
#!/bin/bash
set -e
ancestor_horizon=28 # days (4 weeks)
# We need to add a new remote for the upstream target branch, since this script
# could be running in a personal fork of the repository which has out of date
# branches.
#
# Limit the fetch to a certain date horizon to limit the amount of data we get.
# If the branch was forked from origin/main before this horizon, it should
# probably be rebased.
if ! git ls-remote --exit-code upstream >/dev/null 2>&1 ; then
git remote add upstream https://gitlab.gnome.org/GNOME/pika.git
fi
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" upstream &> ./fetch_upstream.log
# Work out the newest common ancestor between the detached HEAD that this CI job
# has checked out, and the upstream target branch (which will typically be
# `upstream/main` or `upstream/glib-2-62`).
# `${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}` or `${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}`
# are only defined if were running in a merge request pipeline,
# fall back to `${CI_DEFAULT_BRANCH}` or `${CI_COMMIT_BRANCH}` respectively
# otherwise.
# add mr-origin
git remote add mr-origin ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}
source_branch="${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-${CI_COMMIT_BRANCH}}"
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" mr-origin "${source_branch}" &> ./fetch_origin.log
newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}") <(git rev-list --first-parent "mr-origin/${source_branch}") | head -1)
if [ -z "${newest_common_ancestor_sha}" ]; then
echo "Couldnt find common ancestor with upstream main branch. This typically"
echo "happens if you branched from main a long time ago. Please update"
echo "your clone, rebase, and re-push your branch."
exit 1
fi