Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Flakify (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen committed Jan 15, 2022
1 parent 13638ae commit df87eee
Show file tree
Hide file tree
Showing 16 changed files with 471 additions and 309 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
include:
- os: ubuntu-latest
targetOs: Linux
- os: macOS-10.15
targetOs: macOS
- os: ubuntu-latest
targetOs: Windows
name: Build binary for ${{ matrix.targetOs }}
Expand All @@ -27,7 +25,8 @@ jobs:
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
substituters = https://cache.nixos.org https://hydra.iohk.io
- name: Build binary
run: nix-build -A binaries.${{ matrix.targetOS }}
# see https://github.com/NixOS/nix/issues/5302
run: nix build .\?rev=$(git rev-parse HEAD)#binaries-${{ matrix.targetOS }}
- name: Prepare upload
run: |
cd result/bin
Expand All @@ -46,8 +45,6 @@ jobs:
matrix:
os:
- ubuntu-latest
- macOS-10.15
- macOS-11
- windows-latest
name: Test built binaries
runs-on: ${{ matrix.os }}
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ on:
- opened
- synchronize
jobs:
ormolu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: mrkkrp/ormolu-action@v5
test:
runs-on: ubuntu-latest
steps:
Expand All @@ -26,19 +21,8 @@ jobs:
with:
name: hellsmack
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Setup cabal-docspec
run: |
CABAL_DIR=~/.cabal/bin
echo "$CABAL_DIR" >> $GITHUB_PATH
DOCSPEC="$CABAL_DIR/cabal-docspec"
mkdir -p "$CABAL_DIR"
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-$CABAL_DOCSPEC_VERSION/cabal-docspec-$CABAL_DOCSPEC_VERSION.xz | xz -d > "$DOCSPEC"
chmod +x "$DOCSPEC"
"$DOCSPEC" --version
env:
CABAL_DOCSPEC_VERSION: '0.0.0.20210111'

- name: Build and test
run: nix-build --option sandbox false
run: nix flake check --option sandbox false
- name: Run docspec
run: nix-shell --command 'cabal build --enable-tests && ./docspec.sh'
run: nix develop --command sh -c 'cabal build --enable-tests && ./docspec.sh'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ dist-newstyle/
cabal.project.local
artifacts/
result*
.pre-commit-config.yaml
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,10 @@ To update a modpack:

## Installation

Pre-built binaries can be found on the [release page](https://github.com/amesgen/hellsmack/releases). In particular:
Alternatively, pre-built binaries can be found on the [release page](https://github.com/amesgen/hellsmack/releases). In particular:

- [Linux x86_64 (fully static)](https://github.com/amesgen/hellsmack/releases/latest/download/hellsmack-Linux)
- [macOS x86_64](https://github.com/amesgen/hellsmack/releases/latest/download/hellsmack-macOS)
- [Windows x86_64](https://github.com/amesgen/hellsmack/releases/latest/download/hellsmack-Windows)
- [Linux x86_64 (fully static)](https://github.com/amesgen/hellsmack/releases/latest/download/hellsmack-Linux.zip)
- [Windows x86_64](https://github.com/amesgen/hellsmack/releases/latest/download/hellsmack-Windows.zip)

Bash/zsh/fish completions are also available, run one of
```bash
Expand All @@ -128,15 +127,11 @@ Alternatively, you can use [haskell.nix](https://input-output-hk.github.io/haske

Build a fully static Linux binary:
```bash
nix-build -A binaries.Linux
nix build .#binaries-Linux
```
Cross-compile to Windows:
```bash
nix-build -A binaries.Windows
```
Build a self-contained macOS binary:
```
nix-build -A binaries.macOS
nix build .#binaries-Windows
```

## Acknowledgements
Expand Down
3 changes: 0 additions & 3 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
packages: .

with-compiler: ghc-8.10.7
index-state: 2021-11-20T00:00:00Z

constraints: zip +disable-bzip2
73 changes: 0 additions & 73 deletions default.nix

This file was deleted.

Loading

0 comments on commit df87eee

Please sign in to comment.