Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack stats on CI #506

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,9 @@ jobs:
- name: Set PUBLIC_URL
run: echo "PUBLIC_URL=." >> $GITHUB_ENV
- name: Build @stlite/mountable
run: make mountable
run: |
make mountable CRA_ARGS=--stats
mv build/bundle-stats.json bundle-stats.json

- name: Package
working-directory: packages/mountable
Expand All @@ -461,6 +463,12 @@ jobs:
path: packages/mountable/stlite-mountable-v*.tgz
name: stlite-mountable-${{ github.ref_name }}.tgz

- name: Upload the Webpack stats JSON file as an artifact
uses: actions/upload-artifact@v3
with:
path: packages/mountable/bundle-stats.json
name: mountable-bundle-stats.json

publish-mountable:
if: ${{ !failure() && startsWith(github.ref, 'refs/tags/v') }} # `!failure()` is necessary to avoid skipping this job after successful build: https://github.com/actions/runner/issues/491
needs: [build-mountable]
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ $(common-react): packages/common-react/src/*.ts yarn_install
mountable: $(mountable)
$(mountable): packages/mountable/src/*.ts packages/mountable/src/*.tsx $(kernel) $(common-react)
cd packages/mountable; \
yarn build
yarn build ${CRA_ARGS}
@touch $@

.PHONY: sharing
sharing: $(sharing)
$(sharing): packages/sharing/src/*.ts packages/sharing/src/*.tsx $(kernel) $(sharing-common) $(common-react) yarn_install
cd packages/sharing; \
yarn build
yarn build ${CRA_ARGS}
@touch $@

.PHONY: sharing-common
Expand All @@ -82,14 +82,14 @@ $(sharing-common): packages/sharing-common/src/*.ts yarn_install
sharing-editor: $(sharing-editor)
$(sharing-editor): packages/sharing-editor/src/*.ts packages/sharing-editor/src/*.tsx $(common) $(sharing-common) yarn_install
cd packages/sharing-editor; \
yarn build
yarn build ${CRA_ARGS}
@touch $@

.PHONY: desktop
desktop: $(desktop)
$(desktop): packages/desktop/src/*.ts packages/desktop/src/*.tsx packages/desktop/electron/*.ts $(kernel) $(common) $(common-react) yarn_install
cd packages/desktop; \
yarn build
yarn build ${CRA_ARGS}
@touch $@

.PHONY: kernel
Expand Down