Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,28 @@ on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:

jobs:
CompatHelper:
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
- uses: actions/checkout@v4
- uses: julia-actions/add-julia-registry@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
registry: bhftbootcamp/Green
- uses: julia-actions/setup-julia@v2
- uses: julia-actions/cache@v2
- name: Configure CompatHelper
run: |
julia -e '
using Pkg
Pkg.add("CompatHelper")
using CompatHelper
CompatHelper.main(use_existing_registries = true)
'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
GITHUB_TOKEN: ${{ github.token }} # Token required to create a pull request to the same repository
51 changes: 51 additions & 0 deletions .github/workflows/Coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions:
actions: write
contents: read
strategy:
fail-fast: false
matrix:
version:
- '1'
- '1.8'
- '1.9'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/add-julia-registry@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
registry: bhftbootcamp/Green
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info
33 changes: 33 additions & 0 deletions .github/workflows/DocPreviewCleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Doc Preview Cleanup

on:
pull_request:
types: [closed]

# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time
concurrency:
group: doc-preview-cleanup
cancel-in-progress: false

jobs:
doc-preview-cleanup:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Delete preview and history + push changes
run: |
if [ -d "${preview_dir}" ]; then
git config user.name "Documenter.jl"
git config user.email "[email protected]"
git rm -rf "${preview_dir}"
git commit -m "delete preview"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
fi
env:
preview_dir: previews/PR${{ github.event.number }}
Original file line number Diff line number Diff line change
@@ -1,54 +1,12 @@
name: CI
name: Documenter

on:
push:
branches:
- master
tags: ['*']
tags: [v*]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions:
actions: write
contents: read
strategy:
fail-fast: false
matrix:
version:
- '1'
- '1.8'
- '1.9'
- '1.10'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info

docs:
Documenter:
permissions:
contents: write
statuses: write
Expand All @@ -58,10 +16,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/add-julia-registry@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
registry: bhftbootcamp/Green
- uses: julia-actions/setup-julia@latest
- uses: julia-actions/cache@v2
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(; path = pwd())); Pkg.instantiate();'
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path = pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/Registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Update registry

on:
push:
branches:
- master
workflow_dispatch:

jobs:
registry:
name: Update registry
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: julia-actions/add-julia-registry@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
registry: bhftbootcamp/Green
- uses: julia-actions/setup-julia@v2
with:
version: 1.9
- uses: julia-actions/cache@v2
- name: Configure Git
run: |
sudo apt-get update -qq && sudo apt-get install -y -qq git
git config --global user.name github-actions[bot]
git config --global user.email github-actions[bot]@users.noreply.github.com
- name: Updating package version in registers
run: |
julia -e '
using Pkg

Pkg.add("LocalRegistry")
Pkg.develop(url = "[email protected]:${{ github.repository }}.git")

using LocalRegistry
using TOML

package_name = match(r"^.*/(.*?)(\.jl)?(\.git)?$", "${{ github.repository }}")
package_name == nothing && error("Invalid package name: ${{ github.repository }}")
package_name = package_name[1]

package_dir = joinpath(DEPOT_PATH[1], "dev", package_name)
project_toml = TOML.parsefile(joinpath(package_dir, "Project.toml"))
version = VersionNumber(project_toml["version"])

LocalRegistry.register(
package_name,
repo = "https://github.com/${{ github.repository }}.git",
registry = "[email protected]:bhftbootcamp/Green.git",
ignore_reregistration = true,
)

run(Cmd(`git tag -f "v$version"`, dir = package_dir))
run(Cmd(`git push --force origin "v$version"`, dir = package_dir))
'
25 changes: 25 additions & 0 deletions .github/workflows/ReleaseTag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Create release

on:
push:
tags:
- v*
workflow_dispatch:

permissions:
contents: write

jobs:
release:
name: Release pushed tag
runs-on: ubuntu-latest
steps:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="v${tag#v}" \
--generate-notes
31 changes: 0 additions & 31 deletions .github/workflows/TagBot.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://bhftbootcamp.github.io/LibTDJSON.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://bhftbootcamp.github.io/LibTDJSON.jl/dev/)
[![Build Status](https://github.com/bhftbootcamp/LibTDJSON.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/bhftbootcamp/LibTDJSON.jl/actions/workflows/CI.yml?query=branch%3Amaster)
[![Build Status](https://github.com/bhftbootcamp/LibTDJSON.jl/actions/workflows/Coverage.yml/badge.svg?branch=master)](https://github.com/bhftbootcamp/LibTDJSON.jl/actions/workflows/Coverage.yml?query=branch%3Amaster)
[![Coverage](https://codecov.io/gh/bhftbootcamp/LibTDJSON.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/bhftbootcamp/LibTDJSON.jl)
[![Registry](https://img.shields.io/badge/registry-General-4063d8)](https://github.com/JuliaRegistries/General)
[![Registry](https://img.shields.io/badge/registry-Green-green)](https://github.com/bhftbootcamp/Green)

Wrapper for TDLib’s C JSON [interface](https://core.telegram.org/tdlib/docs/td__json__client_8h.html) for building Telegram clients in Julia.

Expand Down
Loading