Skip to content

Commit

Permalink
Merge branch 'master' into cairo-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectrifyPro committed Dec 15, 2024
2 parents 789ad27 + 8044406 commit c716ab4
Show file tree
Hide file tree
Showing 616 changed files with 20,539 additions and 12,597 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [master]
branches: [main]
pull_request:
workflow_dispatch:

Expand All @@ -18,14 +18,14 @@ jobs:
- stable
- beta
- nightly
- "1.70.0"
- "1.80.0"
conf:
- { name: "cairo", features: "png,pdf,svg,ps,use_glib,v1_18,freetype,script,xcb,xlib,win32-surface", nightly: "--features 'png,pdf,svg,ps,use_glib,v1_18,freetype,script,xcb,xlib,win32-surface'", test_sys: true }
- { name: "gdk-pixbuf", features: "v2_42", nightly: "--all-features", test_sys: true }
- { name: "gio", features: "v2_78", nightly: "--all-features", test_sys: true }
- { name: "glib", features: "v2_78", nightly: "--all-features", test_sys: true }
- { name: "graphene", features: "v1_12", nightly: "", test_sys: true }
- { name: "pango", features: "v1_50", nightly: "--all-features", test_sys: true }
- { name: "gio", features: "v2_84", nightly: "--all-features", test_sys: true }
- { name: "glib", features: "v2_84,log", nightly: "--all-features", test_sys: true }
- { name: "graphene", features: "", nightly: "", test_sys: true }
- { name: "pango", features: "v1_54", nightly: "--all-features", test_sys: true }
- { name: "pangocairo", features: "", nightly: "--all-features", test_sys: true }
steps:
- uses: actions/checkout@v4
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v4
with:
repository: gtk-rs/checker
ref: master
ref: main
path: checker
if: matrix.rust == 'nightly'
# nightly
Expand Down Expand Up @@ -85,9 +85,13 @@ jobs:
run: cargo test
working-directory: ${{ matrix.conf.name }}/sys
if: matrix.conf.test_sys
- name: Test ${{ matrix.conf.name }}/gobject-sys
run: cargo test
working-directory: ${{ matrix.conf.name }}/gobject-sys
if: matrix.conf.test_sys && matrix.conf.name == 'glib'
# GLib compile tests only on stable
- name: Compile tests
run: cargo test --manifest-path glib/Cargo.toml --features "compiletests,v2_78"
run: cargo test --manifest-path glib/Cargo.toml --features "compiletests,v2_84"
if: matrix.rust == 'stable'

build-others:
Expand All @@ -100,7 +104,7 @@ jobs:
- stable
- beta
- nightly
- "1.70.0"
- "1.80.0"
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -138,6 +142,12 @@ jobs:
command: fmt
args: --all -- --check

cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2

generator:
name: regen check
runs-on: ubuntu-latest
Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [master]
branches: [main]
pull_request:
workflow_dispatch:
release:
Expand All @@ -11,14 +11,17 @@ name: docs
jobs:
docs:
runs-on: ubuntu-latest
container:
image: ghcr.io/gtk-rs/gtk-rs-core/core:latest
name: build
env:
RELEASES: |
0.20=0.20
0.19=0.19
0.18=0.18
0.17=0.17
0.16=0.16
0.15=0.15
0.14=0.14
RUSTFLAGS: --cfg docsrs
RUSTDOCFLAGS: --cfg docsrs -Zunstable-options --generate-link-to-definition
steps:
Expand All @@ -32,11 +35,12 @@ jobs:
toolchain: nightly
override: true
components: rustfmt
- run: git config --global --add safe.directory /__w/gtk-rs-core/gtk-rs-core
- run: git submodule update --checkout
- run: cargo install rustdoc-stripper
- run: python3 ./generator.py --embed-docs --yes ./
- run: git clone https://gitlab.gnome.org/World/Rust/gir-rustdoc/ # checkout action doesn't support random urls
- run: echo "RUSTDOCFLAGS=$(eval python3 ./gir-rustdoc/gir-rustdoc.py --pages-url 'https://gtk-rs.org/gtk-rs-core/' --default-branch 'master' pre-docs | xargs)" >> ${GITHUB_ENV}
- run: echo "RUSTDOCFLAGS=$(eval python3 ./gir-rustdoc/gir-rustdoc.py --pages-url 'https://gtk-rs.org/gtk-rs-core/' --default-branch 'main' pre-docs | xargs)" >> ${GITHUB_ENV}
- uses: actions-rs/cargo@v1
with:
command: doc
Expand All @@ -60,20 +64,20 @@ jobs:
-p pangocairo-sys
--no-deps
--all-features
- run: echo "RELEASE=$(echo '${{ github.event.release.tag_name }}' | grep -Po '(\d+)\.(\d+)')" >> ${GITHUB_ENV}
- run: echo "RELEASE=$(echo '${{ github.event.release.tag_name }}' | grep -Po '(\d+)\.(\d+)' | head -n1)" >> ${GITHUB_ENV}
- run: echo "DEST=$(if [ "$GITHUB_EVENT_NAME" == "release" ]; then echo 'stable/${{ env.RELEASE }}'; else echo 'git'; fi)" >> ${GITHUB_ENV}
- name: Grab gtk-rs LOGO
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'release' }}
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'release' }}
run: |
wget https://raw.githubusercontent.com/gtk-rs/gtk-rs.github.io/master/logo/gtk-rs-16.png -O ./target/doc/favicon-16x16.png
wget https://raw.githubusercontent.com/gtk-rs/gtk-rs.github.io/master/logo/gtk-rs-32.png -O ./target/doc/favicon-32x32.png
wget https://raw.githubusercontent.com/gtk-rs/gtk-rs.github.io/master/logo/gtk-rs-256.png -O ./target/doc/rust-logo.png
wget https://raw.githubusercontent.com/gtk-rs/gtk-rs.github.io/master/logo/gtk-rs.svg -O ./target/doc/rust-logo.svg
wget https://raw.githubusercontent.com/gtk-rs/gtk-rs.github.io/master/logo/gtk-rs.svg -O ./target/doc/favicon.svg
wget https://raw.githubusercontent.com/gtk-rs/gtk-rs.github.io/main/logo/gtk-rs-16.png -O ./target/doc/favicon-16x16.png
wget https://raw.githubusercontent.com/gtk-rs/gtk-rs.github.io/main/logo/gtk-rs-32.png -O ./target/doc/favicon-32x32.png
wget https://raw.githubusercontent.com/gtk-rs/gtk-rs.github.io/main/logo/gtk-rs-256.png -O ./target/doc/rust-logo.png
wget https://raw.githubusercontent.com/gtk-rs/gtk-rs.github.io/main/logo/gtk-rs.svg -O ./target/doc/rust-logo.svg
wget https://raw.githubusercontent.com/gtk-rs/gtk-rs.github.io/main/logo/gtk-rs.svg -O ./target/doc/favicon.svg
- name: deploy
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'release' }}
uses: peaceiris/actions-gh-pages@v3
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'release' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc/
Expand All @@ -82,8 +86,8 @@ jobs:

- run: python3 ./gir-rustdoc/gir-rustdoc.py --project-title 'GTK Core Rust bindings' html-index
- name: deploy index page
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: '0 0 * * 1'
push:
branches:
- "master"
- "main"
paths:
- "Dockerfile"
pull_request:
Expand All @@ -19,13 +19,13 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- name: Push to GitHub Packages
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository }}/core:latest
2 changes: 1 addition & 1 deletion .github/workflows/typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
push:
branches:
- "master"
- "main"
jobs:
typos:
name: Spell Check with Typos
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [master]
branches: [main]
pull_request:
workflow_dispatch:

Expand All @@ -14,7 +14,7 @@ jobs:

env:
# git revision of gvsbuild we use for to build GLib and the other dependencies
gvsbuildref: 1b3c28a3aa2312e7796f5f91b0a897a7a38b9292
gvsbuildref: bb1d2691d25c7bb1239118a907c8e21b1aa24e03

# bump this number if you want to force a rebuild of gvsbuild with the same revision
gvsbuildupdate: 1
Expand All @@ -28,7 +28,7 @@ jobs:
run: mkdir C:\gtk-build\gtk\x64\release

- name: (GTK binaries) get from cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
with:
path: C:\gtk-build\gtk\x64\release\**
Expand Down Expand Up @@ -80,11 +80,11 @@ jobs:
conf:
- { name: "cairo", test: true, args: "--features png,pdf,svg,ps,use_glib,v1_16,freetype,script,win32-surface" }
- { name: "gdk-pixbuf", test: true, args: "--features v2_42" }
- { name: "gio", test: true, args: "--features v2_74" }
- { name: "glib", test: true, args: "--features v2_74" }
- { name: "gio", test: true, args: "--features v2_80" }
- { name: "glib", test: true, args: "--features v2_80" }
- { name: "glib-build-tools", test: false, args: "" }
- { name: "graphene", test: false, args: "" }
- { name: "pango", test: true, args: "--features v1_50" }
- { name: "pango", test: true, args: "--features v1_52" }
- { name: "pangocairo", test: true, args: "" }
- { name: "examples", test: false, args: "--bins --examples --all-features" }

Expand All @@ -95,7 +95,7 @@ jobs:
run: mkdir C:\gtk-build\gtk\x64\release

- name: Get GTK binaries from cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
with:
path: C:\gtk-build\gtk\x64\release\**
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ config.status
*.so
*.o
*.swp
**Cargo.lock
gtk/tests/*
**~
**/docs.md
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ ue = "ue"
ot = "ot"
siz = "siz"
vai = "vai"
guid = "guid"
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Paolo Borelli:
- gio: use `StrV` for the `file_info` API
- gio: use `GStr` for the manual extension point implementation
- glib: list: mark as transparent and impl TransparentPtr
- glib: Rename `StrVItem` to `GStrPtr` and make it clonable and transparent
- glib: Rename `StrVItem` to `GStrPtr` and make it cloneable and transparent
- glib: `key_file`: return `PtrSlice<GStrPtr>`
- glib-macros: further tweak docs
- glib: Rename `GStrPtr` to `GStringPtr`
Expand Down
Loading

0 comments on commit c716ab4

Please sign in to comment.