From 67ed7447b57f1d79aa8b3bbb80ca0d33a1b9247e Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Tue, 7 Mar 2023 10:32:04 +0100 Subject: [PATCH] Cleanup the generated artifacts --- .github/workflows/publish-artifacts.yml | 2 +- .github/workflows/run-make-all.yml | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-artifacts.yml b/.github/workflows/publish-artifacts.yml index 42c49969..5d781b07 100644 --- a/.github/workflows/publish-artifacts.yml +++ b/.github/workflows/publish-artifacts.yml @@ -49,7 +49,7 @@ jobs: - name: Generate HTML index run: | cd artifacts - tree -H . --noreport --dirsfirst -T 'Catala latest development artifacts' --charset utf-8 -o index.html + tree -H . -L 1 --noreport --dirsfirst -T 'Catala latest development artifacts' --charset utf-8 -o index.html - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: diff --git a/.github/workflows/run-make-all.yml b/.github/workflows/run-make-all.yml index daa33cda..0254e4b4 100644 --- a/.github/workflows/run-make-all.yml +++ b/.github/workflows/run-make-all.yml @@ -31,16 +31,23 @@ jobs: if: ${{ github.ref == 'refs/heads/master' }} run: | RELEASE_TAG=$(git describe --tags) - mkdir -p artifacts docker run --rm catalalang/catala-build:${IMAGE_TAG} sh -uexc ' opam --cli=2.1 remove z3 >&2 opam --cli=2.1 exec -- dune build --profile=release french_law compiler/catala.bc.js >&2 opam --cli=2.1 exec -- dune build --profile=release @doc >&2 opam --cli=2.1 exec -- make -C doc/syntax >&2 - mv _build/default/compiler/catala.bc.js catala_'"${RELEASE_TAG}"'_node.js >&2 - mv _build/default/_doc/_html doc/api >&2 - tar c -h catala_'"${RELEASE_TAG}"'_node.js french_law doc/syntax/syntax.pdf doc/api --exclude french_law/js/node_modules --exclude french_law/python/env --exclude '"'"'.*'"'"' --exclude '"'"'__*'"'"' - ' | tar vx -C artifacts + mkdir -p artifacts >&2 + mv _build/default/compiler/catala.bc.js artifacts/catala_'"${RELEASE_TAG}"'_node.js >&2 + mv _build/default/_doc/_html artifacts/api-doc >&2 + mv doc/syntax/syntax.pdf artifacts/ >&2 + tar czf artifacts/french_law_'"${RELEASE_TAG}"'_ocaml.tar.gz french_law/ocaml >&2 + tar czf artifacts/french_law_'"${RELEASE_TAG}"'_js.tar.gz french_law/js --exclude french_law/js/node_modules >&2 + tar czf artifacts/french_law_'"${RELEASE_TAG}"'_python.tar.gz french_law/python >&2 + ln -s french_law_'"${RELEASE_TAG}"'_ocaml.tar.gz artifacts/french_law_ocaml.tar.gz >&2 + ln -s french_law_'"${RELEASE_TAG}"'_js.tar.gz artifacts/french_law_js.tar.gz >&2 + ln -s french_law_'"${RELEASE_TAG}"'_python.tar.gz artifacts/french_law_python.tar.gz >&2 + tar c artifacts/* + ' | tar vx - name: Build static binaries if: ${{ github.ref == 'refs/heads/master' }} run: ./build_release.sh -C artifacts