mirror of
https://github.com/swarm-game/swarm.git
synced 2024-08-16 18:10:23 +03:00
Move top-level Github/VSCode configuration files (#2037)
* move Mergify, Restyled, Haskell-CI and Pull Request template to `.github` * regenerate Haskell-CI file with the new path and new Haskell CI version * move CSpell from VSCode [Code Spell Checker](https://open-vsx.org/extension/streetsidesoftware/code-spell-checker) extension to `.vscode` This is a complementary top-level cleanup to #2015.
This commit is contained in:
parent
54304e797a
commit
244c882a80
0
.mergify.yml → .github/.mergify.yml
vendored
0
.mergify.yml → .github/.mergify.yml
vendored
0
.restyled.yaml → .github/.restyled.yaml
vendored
0
.restyled.yaml → .github/.restyled.yaml
vendored
19
.github/workflows/haskell-ci.yml
vendored
19
.github/workflows/haskell-ci.yml
vendored
@ -9,7 +9,7 @@
|
||||
#
|
||||
# This GitHub workflow config has been generated by a script via
|
||||
#
|
||||
# haskell-ci 'github' '--config=cabal.haskell-ci' '--copy-fields=all' 'swarm.cabal'
|
||||
# haskell-ci 'github' '--config=.github/workflows/cabal.haskell-ci' '--copy-fields=all' 'swarm.cabal'
|
||||
#
|
||||
# To regenerate the script (for example after adjusting tested-with) run
|
||||
#
|
||||
@ -17,9 +17,9 @@
|
||||
#
|
||||
# For more information, see https://github.com/haskell-CI/haskell-ci
|
||||
#
|
||||
# version: 0.19.20240501
|
||||
# version: 0.19.20240708
|
||||
#
|
||||
# REGENDATA ("0.19.20240501",["github","--config=cabal.haskell-ci","--copy-fields=all","swarm.cabal"])
|
||||
# REGENDATA ("0.19.20240708",["github","--config=.github/workflows/cabal.haskell-ci","--copy-fields=all","swarm.cabal"])
|
||||
#
|
||||
name: Haskell-CI
|
||||
on:
|
||||
@ -84,11 +84,10 @@ jobs:
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
|
||||
mkdir -p "$HOME/.ghcup/bin"
|
||||
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
|
||||
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
|
||||
chmod a+x "$HOME/.ghcup/bin/ghcup"
|
||||
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
|
||||
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
|
||||
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
|
||||
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
|
||||
env:
|
||||
HCKIND: ${{ matrix.compilerKind }}
|
||||
HCNAME: ${{ matrix.compiler }}
|
||||
@ -106,7 +105,7 @@ jobs:
|
||||
echo "HC=$HC" >> "$GITHUB_ENV"
|
||||
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
|
||||
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
|
||||
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
|
||||
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
|
||||
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
|
||||
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
|
||||
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
|
||||
@ -165,8 +164,8 @@ jobs:
|
||||
- name: install cabal-docspec
|
||||
run: |
|
||||
mkdir -p $HOME/.cabal/bin
|
||||
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240414/cabal-docspec-0.0.0.20240414-x86_64-linux.xz > cabal-docspec.xz
|
||||
echo '2d18a3f79619e8ec5f11870f926f6dc2616e02a6c889315b7f82044b95a1adb9 cabal-docspec.xz' | sha256sum -c -
|
||||
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240703/cabal-docspec-0.0.0.20240703-x86_64-linux.xz > cabal-docspec.xz
|
||||
echo '48bf3b7fd2f7f0caa6162afee57a755be8523e7f467b694900eb420f5f9a7b76 cabal-docspec.xz' | sha256sum -c -
|
||||
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
|
||||
rm -f cabal-docspec.xz
|
||||
chmod a+x $HOME/.cabal/bin/cabal-docspec
|
||||
@ -201,7 +200,7 @@ jobs:
|
||||
cat >> cabal.project <<EOF
|
||||
flags: +ci
|
||||
EOF
|
||||
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(swarm)$/; }' >> cabal.project.local
|
||||
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(swarm)$/; }' >> cabal.project.local
|
||||
cat cabal.project
|
||||
cat cabal.project.local
|
||||
- name: dump install plan
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ dist-newstyle/
|
||||
TAGS
|
||||
|
||||
.vscode/
|
||||
!.vscode/cspell.json
|
||||
|
||||
cabal.project.local
|
||||
hie.yaml
|
||||
|
0
cspell.json → .vscode/cspell.json
vendored
0
cspell.json → .vscode/cspell.json
vendored
@ -1,15 +1,15 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
cd $(git rev-parse --show-toplevel)
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
|
||||
DBNAME=hie.sqlite
|
||||
scripts/gen/hiedb.sh $DBNAME
|
||||
scripts/gen/hiedb.sh "$DBNAME"
|
||||
|
||||
WORDS_TMPFILE_UNSORTED=$(mktemp --suffix .words)
|
||||
|
||||
# First, get all variable names that originate from external packages.
|
||||
# Exclude names that contain symbols other than underscore or apostrophe or do not contain any letters.
|
||||
sqlite3 $DBNAME "SELECT substr(sym, 3) FROM (SELECT DISTINCT occ AS sym FROM refs WHERE unit NOT IN (SELECT DISTINCT unit FROM mods)) ORDER BY sym" | grep -v "[^[:alnum:]_']" | grep "[[:alpha:]]" > $WORDS_TMPFILE_UNSORTED
|
||||
sqlite3 "$DBNAME" "SELECT substr(sym, 3) FROM (SELECT DISTINCT occ AS sym FROM refs WHERE unit NOT IN (SELECT DISTINCT unit FROM mods)) ORDER BY sym" | grep -v "[^[:alnum:]_']" | grep "[[:alpha:]]" >"$WORDS_TMPFILE_UNSORTED"
|
||||
|
||||
# Next, append the individual "conids" extracted from all "modids" that originate from external packages.
|
||||
# See definition of "conid" and "monid" here:
|
||||
@ -26,19 +26,19 @@ sqlite3 $DBNAME "SELECT substr(sym, 3) FROM (SELECT DISTINCT occ AS sym FROM ref
|
||||
# Control
|
||||
# Data
|
||||
# Text
|
||||
sqlite3 $DBNAME "SELECT DISTINCT mod FROM refs WHERE unit NOT IN (SELECT DISTINCT unit FROM mods)" | tr '.' '\n' >> $WORDS_TMPFILE_UNSORTED
|
||||
sqlite3 "$DBNAME" "SELECT DISTINCT mod FROM refs WHERE unit NOT IN (SELECT DISTINCT unit FROM mods)" | tr '.' '\n' >>"$WORDS_TMPFILE_UNSORTED"
|
||||
|
||||
WORDS_TMPFILE=$(mktemp --suffix .words)
|
||||
sort -u $WORDS_TMPFILE_UNSORTED > $WORDS_TMPFILE
|
||||
rm $WORDS_TMPFILE_UNSORTED
|
||||
sort -u "$WORDS_TMPFILE_UNSORTED" >"$WORDS_TMPFILE"
|
||||
rm "$WORDS_TMPFILE_UNSORTED"
|
||||
|
||||
CSPELL_TMPFILE=$(mktemp --suffix .cspell)
|
||||
CSPELL_FILEPATH=cspell.json
|
||||
CSPELL_FILEPATH=.vscode/cspell.json
|
||||
|
||||
# Now, stuff the sorted list of names into the cspell JSON file word list.
|
||||
jq '.words = $newWords' --slurpfile newWords <(jq --raw-input --null-input 'inputs' $WORDS_TMPFILE) $CSPELL_FILEPATH > $CSPELL_TMPFILE
|
||||
jq '.words = $newWords' --slurpfile newWords <(jq --raw-input --null-input 'inputs' "$WORDS_TMPFILE") "$CSPELL_FILEPATH" >"$CSPELL_TMPFILE"
|
||||
|
||||
# Overwrite the original with the modified version.
|
||||
mv $CSPELL_TMPFILE $CSPELL_FILEPATH
|
||||
mv "$CSPELL_TMPFILE" "$CSPELL_FILEPATH"
|
||||
|
||||
rm $WORDS_TMPFILE
|
||||
rm "$WORDS_TMPFILE"
|
||||
|
Loading…
Reference in New Issue
Block a user