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

Commit df87eee

Browse files
authored
Flakify (#14)
1 parent 13638ae commit df87eee

File tree

16 files changed

+471
-309
lines changed

16 files changed

+471
-309
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
include:
1414
- os: ubuntu-latest
1515
targetOs: Linux
16-
- os: macOS-10.15
17-
targetOs: macOS
1816
- os: ubuntu-latest
1917
targetOs: Windows
2018
name: Build binary for ${{ matrix.targetOs }}
@@ -27,7 +25,8 @@ jobs:
2725
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
2826
substituters = https://cache.nixos.org https://hydra.iohk.io
2927
- name: Build binary
30-
run: nix-build -A binaries.${{ matrix.targetOS }}
28+
# see https://github.com/NixOS/nix/issues/5302
29+
run: nix build .\?rev=$(git rev-parse HEAD)#binaries-${{ matrix.targetOS }}
3130
- name: Prepare upload
3231
run: |
3332
cd result/bin
@@ -46,8 +45,6 @@ jobs:
4645
matrix:
4746
os:
4847
- ubuntu-latest
49-
- macOS-10.15
50-
- macOS-11
5148
- windows-latest
5249
name: Test built binaries
5350
runs-on: ${{ matrix.os }}

.github/workflows/ci.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ on:
88
- opened
99
- synchronize
1010
jobs:
11-
ormolu:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v2
15-
- uses: mrkkrp/ormolu-action@v5
1611
test:
1712
runs-on: ubuntu-latest
1813
steps:
@@ -26,19 +21,8 @@ jobs:
2621
with:
2722
name: hellsmack
2823
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
29-
- name: Setup cabal-docspec
30-
run: |
31-
CABAL_DIR=~/.cabal/bin
32-
echo "$CABAL_DIR" >> $GITHUB_PATH
33-
DOCSPEC="$CABAL_DIR/cabal-docspec"
34-
mkdir -p "$CABAL_DIR"
35-
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-$CABAL_DOCSPEC_VERSION/cabal-docspec-$CABAL_DOCSPEC_VERSION.xz | xz -d > "$DOCSPEC"
36-
chmod +x "$DOCSPEC"
37-
"$DOCSPEC" --version
38-
env:
39-
CABAL_DOCSPEC_VERSION: '0.0.0.20210111'
4024

4125
- name: Build and test
42-
run: nix-build --option sandbox false
26+
run: nix flake check --option sandbox false
4327
- name: Run docspec
44-
run: nix-shell --command 'cabal build --enable-tests && ./docspec.sh'
28+
run: nix develop --command sh -c 'cabal build --enable-tests && ./docspec.sh'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ dist-newstyle/
22
cabal.project.local
33
artifacts/
44
result*
5+
.pre-commit-config.yaml

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,10 @@ To update a modpack:
104104

105105
## Installation
106106

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

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

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

129128
Build a fully static Linux binary:
130129
```bash
131-
nix-build -A binaries.Linux
130+
nix build .#binaries-Linux
132131
```
133132
Cross-compile to Windows:
134133
```bash
135-
nix-build -A binaries.Windows
136-
```
137-
Build a self-contained macOS binary:
138-
```
139-
nix-build -A binaries.macOS
134+
nix build .#binaries-Windows
140135
```
141136

142137
## Acknowledgements

cabal.project

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
packages: .
22

3-
with-compiler: ghc-8.10.7
4-
index-state: 2021-11-20T00:00:00Z
5-
63
constraints: zip +disable-bzip2

default.nix

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)