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
10 changes: 10 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
URL=https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc
HASH=sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM=
source_url "$URL" "$HASH"
fi

watch_file flake.lock
watch_file flake.nix

use flake . --verbose --show-trace
33 changes: 22 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ on:
workflow_dispatch:
inputs:
version-level:
description: 'Select Version Level'
description: "Select Version Level"
required: true
type: choice
options:
- alpha # Increase the alpha pre-version (x.y.z-alpha.M)
- beta # Increase the beta pre-version (x.y.z-beta.M)
- patch # Increase the patch version (x.y.z)
- minor # Increase the minor version (x.y.0)
- major # Increase the major version (x.0.0)
- alpha # Increase the alpha pre-version (x.y.z-alpha.M)
- beta # Increase the beta pre-version (x.y.z-beta.M)
- patch # Increase the patch version (x.y.z)
- minor # Increase the minor version (x.y.0)
- major # Increase the major version (x.0.0)
- release # Remove the pre-version, ie remove alpha/beta/rc (x.y.z)
- rc # Increase the rc pre-version (x.y.z-rc.M)
- rc # Increase the rc pre-version (x.y.z-rc.M)

jobs:
release:
Expand All @@ -24,11 +24,22 @@ jobs:
fetch-depth: 0
submodules: recursive

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: nixbuild/nix-quick-install-action@v30
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main
nix_conf: |
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
# restore and save a cache using this key
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
# if there's no cache hit, restore a cache by this prefix
restore-prefixes-first-match: nix-${{ runner.os }}-
# collect garbage until the Nix store size (in bytes) is at most this number
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1G

- run: |
git config --global user.email "${{ secrets.CI_GIT_EMAIL }}"
Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/rainix.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Rainix CI
on: [push]

concurrency:
group: ${{ github.ref }}-rainix
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
standard-tests:
strategy:
Expand All @@ -22,9 +26,22 @@ jobs:
fetch-depth: 0
submodules: recursive

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
# restore and save a cache using this key
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
# if there's no cache hit, restore a cache by this prefix
restore-prefixes-first-match: nix-${{ runner.os }}-
# collect garbage until the Nix store size (in bytes) is at most this number
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1G

- run: nix develop --command rainix-rs-prelude
- name: Run ${{ matrix.task }}
Expand All @@ -34,4 +51,4 @@ jobs:
run: nix develop --command ${{ matrix.task }}

- name: Build for wasm target
run: nix develop -c cargo build --target wasm32-unknown-unknown
run: nix develop -c cargo build --target wasm32-unknown-unknown
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
/target
.direnv/
Loading