Skip to content

Commit

Permalink
Combine artifacts into a single release zip (#335)
Browse files Browse the repository at this point in the history
* Combine artifacts into a single release zip

* Fix typo, checkout module folder in release job, update checkout action version

* Update Makefile

* Update .gitignore

* Make sure release folder exists

* Wildcard docs paths
  • Loading branch information
Dewb authored Jan 10, 2024
1 parent 614476b commit 4be4cc3
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 26 deletions.
55 changes: 34 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run clang-format
run: |
curl -O https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py
python ./run-clang-format.py -r module simulator src tests --style=file
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install ragel
Expand All @@ -33,7 +33,7 @@ jobs:
build-simulator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install ragel
Expand All @@ -45,7 +45,7 @@ jobs:
build-firmware:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install ragel
Expand All @@ -65,15 +65,15 @@ jobs:
run: |
cd module
make
- name: Upload teletype.hex to artifacts
uses: actions/upload-artifact@v2
- name: Create firmware artifact
uses: actions/upload-artifact@v4
with:
path: module/teletype.hex
name: teletype.hex
name: teletype (firmware only)
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
Expand All @@ -89,19 +89,32 @@ jobs:
run: |
cd docs
make
- name: Upload docs to artifacts
uses: actions/upload-artifact@v2
- name: Create documentation artifact
uses: actions/upload-artifact@v4
with:
path: docs/teletype.pdf
name: teletype.pdf
- name: Upload cheatsheet to artifacts
uses: actions/upload-artifact@v2
name: teletype (docs only)
path: |
docs/*.pdf
docs/*.html
create-release-zip:
runs-on: ubuntu-latest
needs: [build-firmware, build-docs]
steps:
- uses: actions/checkout@v4
with:
path: docs/cheatsheet/cheatsheet.pdf
name: cheatsheet.pdf
- name: Upload i2c cheatsheet to artifacts
uses: actions/upload-artifact@v2
sparse-checkout: module
- name: Add firmware update scripts to release
run: |
mkdir release
cp module/update_firmware.command release
cp module/flash.sh release
- name: Download artifacts from previous steps
uses: actions/download-artifact@v4
with:
path: docs/cheatsheet/cheatsheet-i2c.pdf
name: cheatsheet-i2c.pdf

path: release
merge-multiple: true
- name: Add release zip to artifacts
uses: actions/upload-artifact@v4
with:
path: release
name: teletype
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ __pycache__/
/simulator/tt
/module/gitversion.c
/tests/tests
/docs/teletype.pdf
/docs/teletype.html
/docs/*.pdf
/docs/*.html
/docs/cheatsheet/*
!/docs/cheatsheet/cs-common.tex
/docs/testServe/
9 changes: 6 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build clean

build: teletype.pdf teletype.html cheatsheet/cheatsheet.pdf cheatsheet/cheatsheet-i2c.pdf
build: teletype.pdf teletype.html cheatsheet.pdf cheatsheet-i2c.pdf

clean:
rm -f teletype.pdf && \
Expand All @@ -24,5 +24,8 @@ cheatsheet/cheatsheet-%.tex: $(wildcard ops/*.toml) ../utils/cheatsheet.py
cheatsheet/cheatsheet-%.pdf: cheatsheet/cs-common.tex cheatsheet/cheatsheet-%.tex
cd cheatsheet && latexmk -xelatex cs-common.tex -jobname=cheatsheet-$*

cheatsheet/cheatsheet.pdf: cheatsheet/cheatsheet-core.pdf
cd cheatsheet && cp cheatsheet-core.pdf cheatsheet.pdf
cheatsheet.pdf: cheatsheet/cheatsheet-core.pdf
cp cheatsheet/cheatsheet-core.pdf cheatsheet.pdf

cheatsheet-i2c.pdf: cheatsheet/cheatsheet-i2c.pdf
cp cheatsheet/cheatsheet-i2c.pdf .

0 comments on commit 4be4cc3

Please sign in to comment.