Skip to content

Adapt to famix changes #47

Adapt to famix changes

Adapt to famix changes #47

Workflow file for this run

# Created following instructions in modularmoose post:
# https://modularmoose.org/2021/07/19/automatic-metamodel-documentation-generation.html
# Name of the project in the GitHub action panel
name: CI
# Execute the CI on push on the master branch
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
smalltalk: [ Moose64-10]
name: $
steps:
- uses: actions/checkout@v2
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
- run: smalltalkci -s ${{ matrix.smalltalk }}
shell: bash
timeout-minutes: 15
- name: Build meta-model uml image
run: |
$SMALLTALK_CI_VM $SMALLTALK_CI_IMAGE eval "'cppFullModel.puml' asFileReference writeStreamDo: [ :stream | stream nextPutAll: (FamixMMUMLDocumentor new withModel: FamixCppModel andColor: Color white ; withModel: FamixCModel andColor: Color lightBlue ; withModel: FamixCPreprocModel andColor: Color lightGreen ; beWithStub; generatePlantUMLModel)]."
- name: Generate SVG Diagram
uses: cloudbees/plantuml-github-action@master
with:
args: -v -tsvg cppFullModel.puml
- name: Generate PNG Diagram
uses: cloudbees/plantuml-github-action@master
with:
args: -v -tpng cppFullModel.puml
- name: Move artifact
run: |
mkdir doc-uml
mv *.svg doc-uml/cppFullModel.svg
mv *.png doc-uml/cppFullModel.png
- name: Init new repo in dist folder and commit generated files
run: |
cd doc-uml/
git init
git add -A
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m 'update uml diagrams'
# Careful, this can kill your project
- name: Force push to destination branch
uses: ad-m/github-push-action@master
with:
# Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
# Destination branch to push changes
branch: v1/doc
# We have to push from the folder where files were generated.
# Same were the new repo was initialized in the previous step
directory: ./doc-uml