diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f127f278..55f39dd8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ 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 @@ -21,7 +21,7 @@ jobs: run-tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Install ragel @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.gitignore b/.gitignore index 22903d05..c86fc4e4 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/docs/Makefile b/docs/Makefile index 391c3550..22c7735f 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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 && \ @@ -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 \ No newline at end of file +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 .