Skip to content

Commit 27c8f7d

Browse files
committed
First Release
1 parent c643e3b commit 27c8f7d

File tree

6 files changed

+204
-2
lines changed

6 files changed

+204
-2
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: download-artifact
2+
3+
description: Download Artifact
4+
5+
inputs:
6+
platform:
7+
description: Platform
8+
required: true
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Env to output
14+
if: |
15+
!(inputs.platform == 'windows-x86_64')
16+
shell: bash
17+
run: |
18+
PACKAGE_NAME=glib.${{ inputs.platform }}.tar.gz
19+
echo "package_name=$PACKAGE_NAME" >> $GITHUB_ENV
20+
echo "$PACKAGE_NAME/glib.${{ inputs.platform }}.tar.gz" >> package_paths.env
21+
- name: Env to output for Windows
22+
if: |
23+
inputs.platform == 'windows-x86_64'
24+
shell: bash
25+
run: |
26+
PACKAGE_NAME=glib.${{ inputs.platform }}.zip
27+
echo "package_name=$PACKAGE_NAME" >> $GITHUB_ENV
28+
echo "$PACKAGE_NAME/glib.${{ inputs.platform }}.zip" >> package_paths.env
29+
- uses: actions/download-artifact@v4
30+
with:
31+
name: ${{ env.package_name }}
32+
path: ${{ env.package_name }}

.github/workflows/build.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: build
2+
on:
3+
push:
4+
paths-ignore:
5+
- "**.md"
6+
- "LICENSE"
7+
- "NOTICE"
8+
- ".gitignore"
9+
- "libraries.properties"
10+
- "build.sh"
11+
tags:
12+
- "*"
13+
14+
jobs:
15+
build-linux:
16+
runs-on: ${{ matrix.platform.host }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
platform:
21+
- name: linux-x86_64
22+
arch_image: x86_64
23+
host: ubuntu-latest
24+
- name: linux-arm64
25+
arch_image: arm64
26+
host: arm64-server
27+
steps:
28+
- name: Check out repository
29+
uses: actions/checkout@v4
30+
31+
- name: Set up QEMU
32+
if: matrix.platform.name == 'linux-arm64'
33+
uses: docker/setup-qemu-action@v3
34+
with:
35+
platforms: arm64
36+
37+
- name: Build GLib Libraries with Docker
38+
run: |
39+
docker run -v $(pwd):/app -w /app ghcr.io/pytgcalls/ntgcalls/${{ matrix.platform.arch_image }}:latest bash build.sh
40+
41+
- name: Prepare for artifact
42+
run: tar -czvf glib.${{ matrix.platform.name }}.tar.gz artifacts
43+
44+
- name: Upload artifact
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: glib.${{ matrix.platform.name }}.tar.gz
48+
path: glib.${{ matrix.platform.name }}.tar.gz
49+
50+
create-release:
51+
name: Create Release
52+
if: contains(github.ref, 'tags/v')
53+
needs: build-linux
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
- uses: ./.github/actions/download
58+
with:
59+
platform: linux-x86_64
60+
- uses: ./.github/actions/download
61+
with:
62+
platform: linux-arm64
63+
- name: Env to output
64+
run: |
65+
echo "package_paths<<EOF" >> $GITHUB_OUTPUT
66+
cat package_paths.env >> $GITHUB_OUTPUT
67+
echo "EOF" >> $GITHUB_OUTPUT
68+
id: env
69+
- name: Release
70+
uses: softprops/action-gh-release@v1
71+
with:
72+
files: ${{ steps.env.outputs.package_paths }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

README.md

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,84 @@
1-
# glib
2-
Build action for glib libraries
1+
# GLib
2+
3+
GLib is the low-level core library that forms the basis for projects such
4+
as GTK and GNOME. It provides data structure handling for C, portability
5+
wrappers, and interfaces for such runtime functionality as an event loop,
6+
threads, dynamic loading, and an object system.
7+
8+
The official download locations are:
9+
<https://download.gnome.org/sources/glib>
10+
11+
The official web site is:
12+
<https://www.gtk.org/>
13+
14+
## Installation
15+
16+
See the file ‘[INSTALL.md](INSTALL.md)’. There is
17+
[separate and more in-depth documentation](./docs/win32-build.md) for building
18+
GLib on Windows.
19+
20+
## Supported versions
21+
22+
Upstream GLib only supports the most recent stable release series, the previous
23+
stable release series, and the current development release series. All
24+
older versions are not supported upstream and may contain bugs, some of which
25+
may be exploitable security vulnerabilities.
26+
27+
See [SECURITY.md](SECURITY.md) for more details.
28+
29+
## Documentation
30+
31+
API documentation is available online for GLib for the:
32+
* [GLib](https://docs.gtk.org/glib/)
33+
* [GObject](https://docs.gtk.org/gobject/)
34+
* [GModule](https://docs.gtk.org/gmodule/)
35+
* [GIO](https://docs.gtk.org/gio/)
36+
37+
## Discussion
38+
39+
If you have a question about how to use GLib, seek help on [GNOME’s Discourse
40+
instance](https://discourse.gnome.org/tags/glib). Alternatively, ask a question
41+
on [StackOverflow and tag it `glib`](https://stackoverflow.com/questions/tagged/glib).
42+
43+
## Reporting bugs
44+
45+
Bugs should be [reported to the GNOME issue tracking system](https://gitlab.gnome.org/GNOME/glib/issues/new).
46+
You will need to create an account for yourself. You may also submit bugs by
47+
e-mail (without an account) by e-mailing <[email protected]>,
48+
but this will give you a degraded experience.
49+
50+
Bugs are for reporting problems in GLib itself, not for asking questions about
51+
how to use it. To ask questions, use one of our [discussion forums](#discussion).
52+
53+
In bug reports please include:
54+
55+
* Information about your system. For instance:
56+
* What operating system and version
57+
* For Linux, what version of the C library
58+
* And anything else you think is relevant.
59+
* How to reproduce the bug.
60+
* If you can reproduce it with one of the test programs that are built
61+
in the `tests/` subdirectory, that will be most convenient. Otherwise,
62+
please include a short test program that exhibits the behavior.
63+
As a last resort, you can also provide a pointer to a larger piece
64+
of software that can be downloaded.
65+
* If the bug was a crash, the exact text that was printed out
66+
when the crash occurred.
67+
* Further information such as stack traces may be useful, but
68+
is not necessary.
69+
70+
## Contributing to GLib
71+
72+
Please follow the [contribution guide](./CONTRIBUTING.md) to know how to
73+
start contributing to GLib.
74+
75+
Patches should be [submitted as merge requests](https://gitlab.gnome.org/GNOME/glib/-/merge_requests/new)
76+
to gitlab.gnome.org. Note that you will need to be logged in to the site to use
77+
this page. If the patch fixes an existing issue, please refer to the
78+
issue in your commit message with the following notation (for issue 123):
79+
```
80+
Closes: #123
81+
```
82+
83+
Otherwise, create a new merge request that introduces the change. Filing a
84+
separate issue is not required.

build.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# shellcheck disable=SC1090
2+
source <(curl -s https://raw.githubusercontent.com/pytgcalls/build-toolkit/refs/heads/master/build-toolkit.sh)
3+
4+
require_venv
5+
6+
GLIB_VERSION=$(get_version "glib")
7+
8+
build_and_install https://github.com/GNOME/glib.git "$GLIB_VERSION" meson-static --buildtype=plain -Dtests=false
9+
10+
mkdir -p artifacts/lib
11+
mkdir -p artifacts/include
12+
run cp -r build_output/lib/*.a artifacts/lib/
13+
run cp -r build_output/include/glib-2.0/* artifacts/include/
14+
run cp build_output/lib/glib-2.0/include/glibconfig.h artifacts/include/

libraries.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
glib=2.84.0

0 commit comments

Comments
 (0)