Skip to content

Commit

Permalink
improve doc and cargo features
Browse files Browse the repository at this point in the history
  • Loading branch information
soywod committed Sep 1, 2024
1 parent 1934119 commit 8bb4b2a
Show file tree
Hide file tree
Showing 11 changed files with 541 additions and 108 deletions.
6 changes: 6 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
github: soywod
ko_fi: soywod
buy_me_a_coffee: soywod
liberapay: soywod
thanks_dev: soywod
custom: https://www.paypal.com/paypalme/soywod
77 changes: 77 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: release

on:
push:
tags:
- v*

jobs:
create-release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- name: Create release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

deploy-releases:
runs-on: ${{ matrix.os }}
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-linux
os: ubuntu-latest
- target: aarch64-linux
os: ubuntu-latest
- target: x86_64-windows
os: ubuntu-latest
- target: x86_64-darwin
os: macos-latest
# FIXME: build broken
# - target: aarch64-darwin
# os: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=channel:nixos-23.11
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v12
with:
name: soywod
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build release archive
run: |
nix build -L .#${{ matrix.target }}
cp result/neverest* .
- name: Upload tgz release archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: neverest.tgz
asset_name: neverest.${{ matrix.target }}.tgz
asset_content_type: application/gzip
- name: Upload zip release archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: neverest.zip
asset_name: neverest.${{ matrix.target }}.zip
asset_content_type: application/zip
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: test

on:
push:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-linux
os: ubuntu-latest
- target: aarch64-linux
os: ubuntu-latest
- target: x86_64-windows
os: ubuntu-latest
- target: x86_64-darwin
os: macos-latest
# FIXME: build broken
# - target: aarch64-darwin
# os: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=channel:nixos-23.11
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v12
with:
name: soywod
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run app
run: |
nix build -L .#${{ matrix.target }}
nix run -L .#${{ matrix.target }} -- --version
ls -R result
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ rustdoc-args = ["--cfg", "docsrs", "--document-private-items"]
default = [
"imap",
"maildir",
"notmuch",
# "notmuch",

"keyring",
"oauth2",
# "keyring",
# "oauth2",
"wizard",
]

Expand All @@ -42,7 +42,7 @@ color-eyre = "0.6"
email-lib = { version = "=0.25.0", default-features = false, features = ["pool", "sync", "derive"] }
oauth-lib = { version = "=0.1.1", optional = true }
once_cell = "1.16"
pimalaya-tui = { version = "=0.1.0", default-features = false, features = ["cli", "config", "tracing"] }
pimalaya-tui = { version = "=0.1.0", default-features = false, features = ["path", "cli", "config", "tracing"] }
secret-lib = { version = "=0.4.6", optional = true, features = ["derive"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down
Loading

0 comments on commit 8bb4b2a

Please sign in to comment.