Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update Flakebox #8

Merged
merged 6 commits into from
Oct 11, 2023
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
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build]
rustflags = ["-C", "link-arg=-fuse-ld=mold", "-C", "link-arg=-Wl,--compress-debug-sections=zlib"]
# [build]
# rustflags = ["-C", "link-arg=-fuse-ld=mold", "-C", "link-arg=-Wl,--compress-debug-sections=zlib"]
1 change: 1 addition & 0 deletions .config/flakebox/id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aedc7b7ff9bf20dbb75ece15fdb9ff1a72bc1f9c5214b967800561df5d2aa745bc1c357fed49da2caa6d2973930b68a749d6913836284051322fe5352bd236b4
28 changes: 28 additions & 0 deletions .config/flakebox/shellHook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
root="$(git rev-parse --show-toplevel)"
dot_git="$(git rev-parse --git-common-dir)"
if [[ ! -d "${dot_git}/hooks" ]]; then mkdir -p "${dot_git}/hooks"; fi
# fix old bug
rm -f "${dot_git}/hooks/comit-msg"
rm -f "${dot_git}/hooks/commit-msg"
ln -sf "${root}/misc/git-hooks/commit-msg" "${dot_git}/hooks/commit-msg"

root="$(git rev-parse --show-toplevel)"
dot_git="$(git rev-parse --git-common-dir)"
if [[ ! -d "${dot_git}/hooks" ]]; then mkdir -p "${dot_git}/hooks"; fi
# fix old bug
rm -f "${dot_git}/hooks/pre-comit"
rm -f "${dot_git}/hooks/pre-commit"
ln -sf "${root}/misc/git-hooks/pre-commit" "${dot_git}/hooks/pre-commit"

# set template
git config commit.template misc/git-hooks/commit-template.txt

if [ -n "${DIRENV_IN_ENVRC:-}" ]; then
# and not set DIRENV_LOG_FORMAT
if [ -n "${DIRENV_LOG_FORMAT:-}" ]; then
>&2 echo "💡 Set 'DIRENV_LOG_FORMAT=\"\"' in your shell environment variables for a cleaner output of direnv"
fi
fi

>&2 echo "💡 Run 'just' for a list of available 'just ...' helper recipes"
1 change: 0 additions & 1 deletion .config/last-share

This file was deleted.

28 changes: 21 additions & 7 deletions .github/workflows/flakebox-ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION

jobs:
build:
name: Build
runs-on: ubuntu-latest
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- name: Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Build Flake
run: '# run the same check that git `pre-commit` hook does

nix flake check .#

'
- name: Build on ${{ matrix.host }}
run: nix build .#ci.htmx-sorta
strategy:
matrix:
host:
- macos
- linux
include:
- host: linux
runs-on: ubuntu-latest
timeout: 60
- host: macos
runs-on: macos-12
timeout: 60
timeout-minutes: ${{ matrix.timeout }}
flake:
name: Flake self-check
runs-on: ubuntu-latest
Expand Down Expand Up @@ -60,3 +71,6 @@ name: CI
tags:
- v*
workflow_dispatch: {}


# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION
14 changes: 10 additions & 4 deletions .github/workflows/flakebox-flakehub-publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION

jobs:
flakehub-publish:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: '${{ (inputs.tag != null) && format(''refs/tags/{0}'', inputs.tag) ||
'''''' }}
'
ref: ${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || ''
}}
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- name: Flakehub Push
Expand All @@ -27,3 +30,6 @@ name: Publish to Flakehub
description: The existing tag to publish to FlakeHub
required: true
type: string


# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION
4 changes: 4 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
group_imports = "StdExternalCrate"
wrap_comments = true
format_code_in_doc_comments = true
imports_granularity = "Module"
33 changes: 24 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[profile.dev]
debug = "line-tables-only"
lto = "off"

[profile.release]
debug = "line-tables-only"
lto = "fat"
codegen-units = 1

[dependencies]
anyhow = "1.0.75"
astra = { git = "https://github.com/dpc/astra", rev = "f135e4c8be0409d371218669bcdb13566f35f116" }
Expand All @@ -36,3 +27,27 @@ serde_urlencoded = "0.7.1"
[dev-dependencies]
quickcheck = "1.0.3"
quickcheck_macros = "1.0.0"



[profile.dev]
debug = "line-tables-only"
lto = "off"

[profile.ci]
inherits = "dev"
incremental = false

[profile.release]
debug = "line-tables-only"
lto = "fat"
codegen-units = 1

# Workaround: https://github.com/rust-lang/cargo/issues/12457 which causes
# https://github.com/ipetkov/crane/issues/370
[profile.dev.build-override]
debug = false
[profile.ci.build-override]
debug = false
[profile.release.build-override]
debug = false
Loading