diff --git a/.github/workflows/bump.yaml b/.github/workflows/bump.yaml new file mode 100644 index 0000000..5cc9c67 --- /dev/null +++ b/.github/workflows/bump.yaml @@ -0,0 +1,29 @@ +name: bump +on: + workflow_dispatch: + schedule: + - cron: '45 6 * * 6' +permissions: + contents: write + pull-requests: write + id-token: write +jobs: + bump-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@v14 + with: + name: tek + signingKey: ${{ secrets.CACHIX_SIGNING_KEY }} + - id: bounds + run: nix run .#bump -- --output=ga-pr + - name: pr + if: steps.bounds.outputs.commit-message + uses: peter-evans/create-pull-request@v5 + with: ${{ steps.bounds.outputs }} diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..8dc039c --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,22 @@ +name: Flake checks +on: [push, pull_request] +permissions: + contents: read + id-token: write +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + extra-substituters = https://tek.cachix.org + extra-trusted-public-keys = tek.cachix.org-1:+sdc73WFq8aEKnrVv5j/kuhmnW2hQJuqdPJF5SnaCBk= + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@v14 + with: + name: tek + signingKey: ${{ secrets.CACHIX_SIGNING_KEY }} + - run: nix flake check diff --git a/.github/workflows/lower-init.yaml b/.github/workflows/lower-init.yaml new file mode 100644 index 0000000..7ae4731 --- /dev/null +++ b/.github/workflows/lower-init.yaml @@ -0,0 +1,26 @@ +name: lower-init +on: workflow_dispatch +permissions: + contents: write + pull-requests: write + id-token: write +jobs: + lower-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@v14 + with: + name: tek + signingKey: ${{ secrets.CACHIX_SIGNING_KEY }} + - id: bounds + run: nix run .#lower.init -- --output=ga-pr + - name: pr + if: steps.bounds.outputs.commit-message + uses: peter-evans/create-pull-request@v5 + with: ${{ steps.bounds.outputs }} diff --git a/.github/workflows/lower-optimize.yaml b/.github/workflows/lower-optimize.yaml new file mode 100644 index 0000000..d1cad00 --- /dev/null +++ b/.github/workflows/lower-optimize.yaml @@ -0,0 +1,26 @@ +name: lower-optimize +on: workflow_dispatch +permissions: + contents: write + pull-requests: write + id-token: write +jobs: + lower-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@v14 + with: + name: tek + signingKey: ${{ secrets.CACHIX_SIGNING_KEY }} + - id: bounds + run: nix run .#lower.optimize -- --output=ga-pr + - name: pr + if: steps.bounds.outputs.commit-message + uses: peter-evans/create-pull-request@v5 + with: ${{ steps.bounds.outputs }} diff --git a/.github/workflows/lower.yaml b/.github/workflows/lower.yaml new file mode 100644 index 0000000..cf0e80f --- /dev/null +++ b/.github/workflows/lower.yaml @@ -0,0 +1,26 @@ +name: lower +on: [workflow_dispatch, pull_request, push] +permissions: + contents: write + pull-requests: write + id-token: write +jobs: + lower-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@v14 + with: + name: tek + signingKey: ${{ secrets.CACHIX_SIGNING_KEY }} + - id: bounds + run: nix run .#lower -- --output=ga-pr + - name: pr + if: steps.bounds.outputs.commit-message + uses: peter-evans/create-pull-request@v5 + with: ${{ steps.bounds.outputs }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index aeb5200..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Run Tests -on: - push: - branches: - - "**" - pull_request: -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.4.0 - - uses: cachix/install-nix-action@v20 - - run: nix -L flake check diff --git a/flake.lock b/flake.lock index 84fe043..7c5626f 100644 --- a/flake.lock +++ b/flake.lock @@ -2,72 +2,14 @@ "nodes": { "hix": { "inputs": { - "nixpkgs": "nixpkgs", - "thax": "thax" + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1695065405, - "narHash": "sha256-7YZRGPaFM2coVYtVqnK4ug6/1kXTjwGaVSGgu09ZBsA=", + "lastModified": 1716836463, + "narHash": "sha256-tHsRwzOzs0t3nAekI368bUwVbK22v/rAtvoW5uQ7GEc=", "ref": "refs/heads/main", - "rev": "bb0d49863a39b1c2fe7f2c21b05f246c21920862", - "revCount": 550, - "type": "git", - "url": "https://git.tryp.io/tek/hix" - }, - "original": { - "type": "git", - "url": "https://git.tryp.io/tek/hix" - } - }, - "hix_2": { - "inputs": { - "nixpkgs": "nixpkgs_2", - "thax": "thax_2" - }, - "locked": { - "lastModified": 1695065405, - "narHash": "sha256-7YZRGPaFM2coVYtVqnK4ug6/1kXTjwGaVSGgu09ZBsA=", - "ref": "refs/heads/main", - "rev": "bb0d49863a39b1c2fe7f2c21b05f246c21920862", - "revCount": 550, - "type": "git", - "url": "https://git.tryp.io/tek/hix" - }, - "original": { - "type": "git", - "url": "https://git.tryp.io/tek/hix" - } - }, - "hix_3": { - "inputs": { - "nixpkgs": "nixpkgs_3", - "thax": "thax_3" - }, - "locked": { - "lastModified": 1695065405, - "narHash": "sha256-7YZRGPaFM2coVYtVqnK4ug6/1kXTjwGaVSGgu09ZBsA=", - "ref": "refs/heads/main", - "rev": "bb0d49863a39b1c2fe7f2c21b05f246c21920862", - "revCount": 550, - "type": "git", - "url": "https://git.tryp.io/tek/hix" - }, - "original": { - "type": "git", - "url": "https://git.tryp.io/tek/hix" - } - }, - "hix_4": { - "inputs": { - "nixpkgs": "nixpkgs_4", - "thax": "thax_4" - }, - "locked": { - "lastModified": 1695065405, - "narHash": "sha256-7YZRGPaFM2coVYtVqnK4ug6/1kXTjwGaVSGgu09ZBsA=", - "ref": "refs/heads/main", - "rev": "bb0d49863a39b1c2fe7f2c21b05f246c21920862", - "revCount": 550, + "rev": "5c4a142820f76ad8f777608ec8ae03f341a37bc5", + "revCount": 744, "type": "git", "url": "https://git.tryp.io/tek/hix" }, @@ -78,188 +20,23 @@ }, "nixpkgs": { "locked": { - "lastModified": 1686582075, - "narHash": "sha256-vtflsfKkHtF8IduxDNtbme4cojiqvlvjp5QNYhvoHXc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7e63eed145566cca98158613f3700515b4009ce3", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7e63eed145566cca98158613f3700515b4009ce3", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1686582075, - "narHash": "sha256-vtflsfKkHtF8IduxDNtbme4cojiqvlvjp5QNYhvoHXc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7e63eed145566cca98158613f3700515b4009ce3", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7e63eed145566cca98158613f3700515b4009ce3", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1686582075, - "narHash": "sha256-vtflsfKkHtF8IduxDNtbme4cojiqvlvjp5QNYhvoHXc=", + "lastModified": 1713964598, + "narHash": "sha256-p+CXCrOuWFVBpjaknbpenkxdYt097mOI4VBMqlHv46E=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7e63eed145566cca98158613f3700515b4009ce3", + "rev": "4f6ebb60e63f3ccd1024eb2f31e653d2fe03fa66", "type": "github" }, "original": { "owner": "nixos", "repo": "nixpkgs", - "rev": "7e63eed145566cca98158613f3700515b4009ce3", + "rev": "4f6ebb60e63f3ccd1024eb2f31e653d2fe03fa66", "type": "github" } }, - "nixpkgs_4": { - "locked": { - "lastModified": 1686582075, - "narHash": "sha256-vtflsfKkHtF8IduxDNtbme4cojiqvlvjp5QNYhvoHXc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7e63eed145566cca98158613f3700515b4009ce3", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7e63eed145566cca98158613f3700515b4009ce3", - "type": "github" - } - }, - "polysemy-conc": { - "inputs": { - "hix": "hix_2", - "polysemy-time": "polysemy-time" - }, - "locked": { - "lastModified": 1695487841, - "narHash": "sha256-EKy9ab/uJaL2oUXdzJvSXdnR0JTvrexnIRALtB9QjY0=", - "ref": "refs/heads/main", - "rev": "aeff447e442c16e49fca9f892abeaa96ab3bb011", - "revCount": 252, - "type": "git", - "url": "https://git.tryp.io/tek/polysemy-conc" - }, - "original": { - "type": "git", - "url": "https://git.tryp.io/tek/polysemy-conc" - } - }, - "polysemy-test": { - "inputs": { - "hix": "hix_4" - }, - "locked": { - "lastModified": 1695486735, - "narHash": "sha256-dGtBvUAka1aXwFZOqpXQSjr6OUIHKQ2871y/mbz+XNU=", - "ref": "refs/heads/main", - "rev": "04c40b63ac15b55edd67f0e0bb114531eb87bbc8", - "revCount": 117, - "type": "git", - "url": "https://git.tryp.io/tek/polysemy-test" - }, - "original": { - "type": "git", - "url": "https://git.tryp.io/tek/polysemy-test" - } - }, - "polysemy-time": { - "inputs": { - "hix": "hix_3", - "polysemy-test": "polysemy-test" - }, - "locked": { - "lastModified": 1695487113, - "narHash": "sha256-Ael5QrdSRV8VJFln+TuW0xIX4Bpbo+mbuctUwQGI+DA=", - "ref": "refs/heads/main", - "rev": "1745050671e71f5a7dfc4d0178d2ff2dd570db12", - "revCount": 102, - "type": "git", - "url": "https://git.tryp.io/tek/polysemy-time" - }, - "original": { - "type": "git", - "url": "https://git.tryp.io/tek/polysemy-time" - } - }, "root": { "inputs": { - "hix": "hix", - "polysemy-conc": "polysemy-conc" - } - }, - "thax": { - "locked": { - "lastModified": 1691091387, - "narHash": "sha256-i1dc/XqsIQizZ09o2ltX10zhV/3LCc0ZUqsS7enyN+g=", - "owner": "tek", - "repo": "thax", - "rev": "10fa7482d171739414fc0d829005b4055799e4c6", - "type": "github" - }, - "original": { - "owner": "tek", - "repo": "thax", - "type": "github" - } - }, - "thax_2": { - "locked": { - "lastModified": 1691091387, - "narHash": "sha256-i1dc/XqsIQizZ09o2ltX10zhV/3LCc0ZUqsS7enyN+g=", - "owner": "tek", - "repo": "thax", - "rev": "10fa7482d171739414fc0d829005b4055799e4c6", - "type": "github" - }, - "original": { - "owner": "tek", - "repo": "thax", - "type": "github" - } - }, - "thax_3": { - "locked": { - "lastModified": 1691091387, - "narHash": "sha256-i1dc/XqsIQizZ09o2ltX10zhV/3LCc0ZUqsS7enyN+g=", - "owner": "tek", - "repo": "thax", - "rev": "10fa7482d171739414fc0d829005b4055799e4c6", - "type": "github" - }, - "original": { - "owner": "tek", - "repo": "thax", - "type": "github" - } - }, - "thax_4": { - "locked": { - "lastModified": 1691091387, - "narHash": "sha256-i1dc/XqsIQizZ09o2ltX10zhV/3LCc0ZUqsS7enyN+g=", - "owner": "tek", - "repo": "thax", - "rev": "10fa7482d171739414fc0d829005b4055799e4c6", - "type": "github" - }, - "original": { - "owner": "tek", - "repo": "thax", - "type": "github" + "hix": "hix" } } }, diff --git a/flake.nix b/flake.nix index 49db93f..60427bf 100644 --- a/flake.nix +++ b/flake.nix @@ -3,20 +3,28 @@ inputs = { hix.url = "git+https://git.tryp.io/tek/hix"; - polysemy-conc.url = "git+https://git.tryp.io/tek/polysemy-conc"; }; - outputs = {hix, polysemy-conc, ...}: hix.lib.pro ({config, ...}: { - ghcVersions = ["ghc92" "ghc94" "ghc96"]; + outputs = { hix, ... }: hix.lib.pro ({config, ...}: let + overrides = {jailbreak, unbreak, ...}: { + polysemy-test = jailbreak unbreak; + polysemy-conc = jailbreak; + }; + in { + ghcVersions = ["ghc94" "ghc96" "ghc98"]; + compat.versions = ["ghc96"]; hackage.versionFile = "ops/version.nix"; main = "polysemy-log"; - deps = [polysemy-conc]; - compiler = "ghc94"; gen-overrides.enable = true; - - envs.dev.overrides = {hackage, ...}: { - polysemy-conc = hackage "0.13.0.1" "01zfjx1kmrw5hnqyckrwwkdzjbihfn6y516lw7lffhqfp354522b"; + managed = { + enable = true; + lower.enable = true; + envs.solverOverrides = overrides; + latest.compiler = "ghc98"; }; + hixCli.dev = true; + + inherit overrides; cabal = { license = "BSD-2-Clause-Patent";