-
Notifications
You must be signed in to change notification settings - Fork 8
99 lines (86 loc) · 2.61 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Generate Mystery and Deploy
on:
workflow_dispatch:
workflow_call:
schedule:
- cron: "0 1 * * *"
push:
branches: [ code ]
paths:
- setup.py
- bin/**
- config/**
- DetectiveMysteryOMatic/**
- static/**
- scenarios/**
- .github/**
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
repository: mystery-o-matic/story
path: story
token: ${{ secrets.PAT_STORY_TOKEN }}
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install libsecp256k1-dev graphviz graphviz-dev
sudo cp /usr/lib/x86_64-linux-gnu/libsecp256k1.so.1 /usr/lib/x86_64-linux-gnu/libsecp256k1.so.2
- name: Install Echidna
run: |
sudo mv ./bin/echidna /usr/bin
echidna --version
- name: Install solc using solc-select
run: |
pip install solc-select
solc-select install 0.8.17
solc-select use 0.8.17
- name: Install fonts
run: |
sudo apt-get remove fonts-noto-color-emoji
mkdir -p ~/.local/share/fonts
unzip -u "fonts/Raleway.zip" -d ~/.local/share/fonts
rm -Rf ~/.local/share/fonts/OFL.txt
rm -Rf ~/.local/share/fonts/README.txt
unzip -u "fonts/Noto_Emoji.zip" -d ~/.local/share/fonts
rm -Rf ~/.local/share/fonts/README.txt
mkdir ~/.config/fontconfig
cp fonts/fonts.conf ~/.config/fontconfig
fc-cache -f -v
- name: Install mystery-o-matic
run: |
pip3 install .
- name: Generate Murder Mystery
run: |
if [ $(( $(date +%u) % 2 )) -eq 1 ]; then # Harder puzzles half of the days
mystery-o-matic scenarios/simple.template.sol static out --today --workers 1 --season 2 --nplaces 5 --nchars 4 --llm
else
mystery-o-matic scenarios/simple.template.sol static out --today --workers 1 --season 2 --llm
fi
rm -f out/result.json
rm -f out/err.out
rm -f out/model.sol
rm -f out/en/index.template.html
rm -f out/es/index.template.html
sed -ie "s/\${DATE}/$(date -I)/" out/sitemap.xml
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload the resulting folder
path: 'out'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4