-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Check for new upstream font data | ||
on: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
schedule: | ||
- cron: '0 0 * * 0' | ||
jobs: | ||
check_upstream_changes: | ||
name: Check upstream changes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- uses: Check generated fonts file | ||
run: ./regenerate_fonts_file_from_upstream.sh --check --hide-progress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
SCRIPTPATH=$( | ||
cd "$(dirname "$(readlink -f "$0")")" || exit 1 | ||
pwd -P | ||
) | ||
cd "$SCRIPTPATH/tools/generate_fonts_file" | ||
|
||
TMP_DIR=$(mktemp -d) | ||
|
||
# check if tmp dir was created | ||
if [[ ! "$TMP_DIR" || ! -d "$TMP_DIR" ]]; then | ||
echo "Could not create temp dir" | ||
exit 1 | ||
fi | ||
|
||
# Remove temp dir on exit | ||
function cleanup { | ||
rm -rf "$TMP_DIR" | ||
echo "Deleted temp working directory $TMP_DIR" | ||
} | ||
trap cleanup EXIT | ||
|
||
curl --no-progress-meter --fail-with-body --output-dir "$TMP_DIR" -O https://raw.githubusercontent.com/olikraus/u8g2/master/csrc/u8g2_fonts.c | ||
|
||
cargo run --release -- "$@" "$TMP_DIR/u8g2_fonts.c" "$SCRIPTPATH/src/fonts.rs" |