Skip to content

Commit d695df4

Browse files
Configure github page.
1 parent 1e80fb5 commit d695df4

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

.github/workflows/continuous-integration.yaml

+74
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,77 @@ jobs:
266266
upload_url: ${{ needs.release.outputs.upload_url }}
267267
asset_path: ${{ matrix.asset_path }}
268268
overwrite: true
269+
270+
# Create a release on new v* tags
271+
release:
272+
needs: test
273+
name: "Publish website"
274+
runs-on: ubuntu-latest
275+
steps:
276+
- name: "Checkout repository"
277+
uses: actions/checkout@v2
278+
279+
- name: "Setup Cpp"
280+
uses: aminya/setup-cpp@v1
281+
with:
282+
compiler: ${{ matrix.compiler }}
283+
vcvarsall: ${{ contains(matrix.os, 'windows' )}}
284+
cmake: true
285+
ninja: true
286+
clangtidy: false
287+
cppcheck: false
288+
gcovr: "5.0"
289+
opencppcoverage: false
290+
291+
- name: "Setup Java"
292+
uses: actions/setup-java@v3
293+
with:
294+
distribution: "temurin"
295+
java-version: '17'
296+
check-latest: true
297+
298+
- name: "Install Linux Dependencies"
299+
run: sudo apt install libboost-graph-dev
300+
301+
- name: "Setup Emscripten"
302+
uses: mymindstorm/setup-emsdk@v7
303+
304+
- name: "Configure cmake with emscripten"
305+
run: >
306+
emcmake cmake -S .
307+
-B ./build
308+
-DCMAKE_BUILD_TYPE:STRING=Release
309+
-DDIAGON_BUILD_TESTS:BOOL=OFF
310+
-DDIAGON_BUILD_TESTS_FUZZER:BOOL=OFF;
311+
312+
- name: "Configure CMake"
313+
if: ${{ !matrix.emscripten }}
314+
run: >
315+
cmake -S .
316+
-B ./build
317+
-DCMAKE_BUILD_TYPE:STRING=Release
318+
-DDIAGON_BUILD_TESTS:BOOL=OFF
319+
-DDIAGON_BUILD_TESTS_FUZZER:BOOL=OFF;
320+
321+
- name: "Build"
322+
run: >
323+
cmake
324+
--build ./build
325+
--target package;
326+
327+
- name: "Make webAssembly distribution"
328+
run: >
329+
cd build;
330+
mkdir -p diagon-Web;
331+
cp diagon.js diagon-Web;
332+
cp diagon*wasm diagon-Web;
333+
cp index.html diagon-Web;
334+
cp style.css diagon-Web;
335+
336+
- name: Deploy
337+
uses: peaceiris/actions-gh-pages@v3
338+
with:
339+
github_token: ${{ secrets.GITHUB_TOKEN }}
340+
publish_dir: ./build/diagon-Web
341+
publish_branch: gh-pages
342+
force_orphan: true

0 commit comments

Comments
 (0)