Skip to content

Commit

Permalink
Migrate to new maintainers
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryET committed Aug 15, 2022
1 parent 48caef0 commit 8abd89b
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 79 deletions.
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
@@ -0,0 +1,25 @@
# Description

<!--
Please include:
* summary of the changes and the related issue
* relevant motivation and context
-->

Resolves # (issue)

## How Has This Been Tested?

<!--
Please:
* describe the tests that you ran to verify your changes.
* provide instructions so we can reproduce.
-->

<!-- If valid for smoke test on feature add screenshots -->

## Due Dilligence

* [ ] Breaking change
* [ ] Requires a documentation update
* [ ] Requires a e2e/integration test update
111 changes: 111 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,111 @@
name: ci

on:
pull_request:
paths-ignore:
- '.github/**'
- 'README.md'

push:
branches: ['main']
paths-ignore:
- '.github/**'
- 'README.md'

concurrency:
# Support push/pr as event types with different behaviors each:
# 1. push: queue up builds
# 2. pr: only allow one run per PR
group: ${{ github.workflow }}-${{ github.event.type }}${{ github.event.pull_request.number }}
# If there is already a workflow running for the same pull request, cancel it
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
tasks:
name: "[${{ matrix.os }}] ${{ matrix.cargo.name }}"
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
rust:
- stable
cargo:
- name: "Clippy"
cmd: clippy
args: -- -D clippy::all
cache: {}
- name: "Formatting"
cmd: fmt
args: -- --check
cache: {}
- name: "Unit Tests"
cmd: test
args: --all-features
cache: { sharedKey: "tests" }
include:
- os: ubuntu-latest
sccache-path: /home/runner/.cache/sccache
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: 1G
SCCACHE_DIR: ${{ matrix.sccache-path }}
steps:
# Checkout code
- name: "Git checkout"
uses: actions/checkout@v2

# Install sccache
- name: "Install sccache"
if: matrix.os == 'ubuntu-latest'
env:
SCCACHE_URL: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.2.15
run: |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
curl -sSL "$SCCACHE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
install -vDm 755 "$SCCACHE_FILE/sccache" "$HOME/.local/bin/sccache"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
# Install Rust toolchain
- name: "Install Rust ${{ matrix.rust }}"
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true

# Rebuild cache
- name: Cache cargo registry
uses: Swatinem/rust-cache@3bb3a9a087029c7bc392586cdc88cb6f66b9c6ef
with: ${{ matrix.cargo.cache }}
continue-on-error: false

- name: Cache sccache
uses: actions/cache@v2
continue-on-error: false
with:
path: ${{ matrix.sccache-path }}
key: ${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-sccache-
# Run job
- name: "Start sccache server"
run: |
sccache --stop-server || true
sccache --start-server
- name: "Task ${{ matrix.cargo.name }}"
uses: actions-rs/cargo@v1
with:
command: ${{ matrix.cargo.cmd }}
args: ${{ matrix.cargo.args }}

- name: "Print sccache stats"
run: sccache --show-stats

- name: "Stop sccache server"
run: sccache --stop-server || true
61 changes: 0 additions & 61 deletions .github/workflows/test.yml

This file was deleted.

5 changes: 3 additions & 2 deletions Cargo.toml
Expand Up @@ -2,15 +2,16 @@
name = "a2"
version = "0.6.2"
authors = [
"Harry Bairstow <harry@walletconnect.com>",
"Julius de Bruijn <julius@nauk.io>",
"Sergey Tkachenko <seriy.tkachenko@gmail.com>",
]
license = "MIT"
readme = "README.md"
description = "A native, asynchronous Apple push notification client"
keywords = ["apns", "apple", "push", "async", "http2"]
repository = "https://github.com/pimeys/a2.git"
homepage = "https://github.com/pimeys/a2"
repository = "https://github.com/walletconnect/a2.git"
homepage = "https://github.com/walletconnect/a2"
documentation = "https://docs.rs/a2"
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Sergey Tkachenko
Copyright (c) 2022 WalletConnect

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 5 additions & 15 deletions README.md
@@ -1,25 +1,19 @@
# a2

[![Cargo tests](https://github.com/pimeys/a2/actions/workflows/test.yml/badge.svg)](https://github.com/pimeys/a2/actions/workflows/test.yml)
[![CI Status](https://github.com/walletconnect/a2/actions/workflows/ci.yml/badge.svg)](https://github.com/walletconnect/a2/actions/workflows/ci.yml)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
[![crates.io](http://meritbadge.herokuapp.com/a2)](https://crates.io/crates/a2)

[Matrix chat](https://matrix.to/#/#rust-push:nauk.io?via=nauk.io&via=matrix.org&via=shine.horse)
[![crates.io](https://img.shields.io/crates/v/a2)](https://crates.io/crates/a2)

HTTP/2 Apple Push Notification Service for Rust using Tokio and async sending.

## Help needed

The main author is not currently owning any Apple phones, so would be nice to have some help from a co-author with needed devices and an Apple developer account. If you happen to have them and are willing to help, please contact!

## Requirements

Needs a Tokio executor version 0.2 or later and Rust compiler version 1.39.0 or later.

## Documentation

* [Released](https://docs.rs/a2/)
* [Master](https://pimeys.github.io/a2/master/)
* [Master](https://walletconnect.github.io/a2/master/)

## Features

Expand All @@ -38,9 +32,9 @@ Needs a Tokio executor version 0.2 or later and Rust compiler version 1.39.0 or

The library supports connecting to Apple Push Notification service [either using
a
certificate](https://github.com/pimeys/a2/blob/master/examples/certificate_client.rs)
certificate](https://github.com/walletconnect/a2/blob/master/examples/certificate_client.rs)
with a password [or a private
key](https://github.com/pimeys/a2/blob/master/examples/token_client.rs) with
key](https://github.com/walletconnect/a2/blob/master/examples/token_client.rs) with
a team id and key id. Both are available from your Apple account and with both
it is possible to send push notifications to one application.

Expand Down Expand Up @@ -70,7 +64,3 @@ for production use:
## Tests

`cargo test`

## Contact

oh_lawd @ IRC (Freenode, Mozilla)

0 comments on commit 8abd89b

Please sign in to comment.