Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions libphosh-rs/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
libphosh/src/auto/** gitlab-generated
libphosh/sys/src/lib.rs gitlab-generated
libphosh/sys/tests/**
5 changes: 5 additions & 0 deletions libphosh-rs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
libphosh/sys/target
target/
subprojects/gvc/
subprojects/libcall-ui/
subprojects/phosh/
86 changes: 86 additions & 0 deletions libphosh-rs/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
stages:
- build
- test+docs
- deploy

image: debian:forky

default:
# Protect CI infra from rogue jobs
timeout: 15 minutes
# Allow jobs to be caneled on new commits
interruptible: true
# Retry on infra hickups automatically
retry:
max: 1
when:
- 'api_failure'
- 'runner_system_failure'
- 'scheduler_failure'
- 'stuck_or_timeout_failure'

workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
# Don't trigger a branch pipeline if there is an open MR
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH

variables:
DEPS: |
git build-essential ca-certificates meson curl rustup xmlstarlet
GIT_SUBMODULE_STRATEGY: recursive
RUST_VERSION: stable

.common_before_script: &common_before_script
before_script:
- apt update
- apt install -y --no-install-recommends eatmydata
- eatmydata apt install -y --no-install-recommends $DEPS
- rustup default $RUST_VERSION
- git submodule update --checkout
- meson subprojects download phosh
- if [ -n "$UPSTREAM_BRANCH" ]; then cd subprojects/phosh && git fetch origin "$UPSTREAM_BRANCH" && git checkout FETCH_HEAD && cd -; fi
- cd subprojects/phosh && eatmydata apt -y --no-install-recommends build-dep . && cd -

build:
stage: build
<<: *common_before_script
script:
# Build phosh
- meson setup _build
- meson compile -C _build
- meson install -C _build
# Build gir
- cd gir && cargo build && cd -
# Rebuild bindings
- make

build-doc:
stage: test+docs
needs: []
variables:
GIT_SUBMODULE_STRATEGY: recursive
RUSTFLAGS: --cfg docsrs
RUST_VERSION: nightly
<<: *common_before_script
script:
- ./build-doc.sh
- mv target/doc/ docs
artifacts:
paths:
- docs

pages:
stage: deploy
needs: [ build-doc ]
script:
- mkdir -p public/git
- mv docs public/git/docs
artifacts:
paths:
- public
rules:
- if: $CI_DEFAULT_BRANCH == $CI_COMMIT_BRANCH
8 changes: 8 additions & 0 deletions libphosh-rs/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "gir"]
path = gir
url = https://github.com/gtk-rs/gir.git
update = none
[submodule "gir-files"]
path = gir-files
url = https://github.com/gtk-rs/gir-files.git
update = none
Comment on lines +1 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Nested submodules cannot initialize

The imported gir and gir-files entries are gitlinks, but these mappings are placed in libphosh-rs/.gitmodules while the repository-level .gitmodules is empty. Git therefore cannot resolve either mapping in a fresh checkout, and the binding regeneration command in libphosh-rs/Makefile fails when it tries to initialize gir. Register both gitlinks in the root .gitmodules using their full repository-relative paths.

Loading
Loading