Skip to content

Commit

Permalink
Rename Makefile.tiles → Makefile for simpler command line usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaseberle committed Feb 28, 2024
1 parent 19a65d0 commit 1c3eabc
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/build-tiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ jobs:
- name: Test
run: |
TILENAME=${{ inputs.setname }} make -f Makefile.tiles ${{ inputs.setname }}_tile_list_chunks
TILENAME=${{ inputs.setname }} make -n -f Makefile.tiles ${{ inputs.zip }}
TILENAME=${{ inputs.setname }} make ${{ inputs.setname }}_tile_list_chunks
TILENAME=${{ inputs.setname }} make -n ${{ inputs.zip }}
- name: Build
id: build
run: |
TILENAME=${{ inputs.setname }} make -f Makefile.tiles ${{ inputs.setname }}_tile_list_chunks
TILENAME=${{ inputs.setname }} timeout 300m make -f Makefile.tiles ${{ inputs.zip }}.info && echo "done=true" >> "$GITHUB_OUTPUT" || echo "done=false" >> "$GITHUB_OUTPUT"
TILENAME=${{ inputs.tileset }} make -f Makefile.tiles ${{ inputs.zip }}.sha256
TILENAME=${{ inputs.setname }} make ${{ inputs.setname }}_tile_list_chunks
TILENAME=${{ inputs.setname }} timeout 300m make ${{ inputs.zip }}.info && echo "done=true" >> "$GITHUB_OUTPUT" || echo "done=false" >> "$GITHUB_OUTPUT"
TILENAME=${{ inputs.tileset }} make ${{ inputs.zip }}.sha256
- name: Show work
if: steps.build.outputs.done == 'true'
Expand All @@ -59,7 +59,7 @@ jobs:
echo '```' >> $GITHUB_STEP_SUMMARY
#unzip -l ${{ inputs.zip }} *.dsf >> $GITHUB_STEP_SUMMARY
echo "COMPLETED?: ${{ steps.build.outputs.done }}" >> $GITHUB_STEP_SUMMARY
TILENAME=${{ inputs.setname }} make -f Makefile.tiles ${{ inputs.zip }}.info >> $GITHUB_STEP_SUMMARY
TILENAME=${{ inputs.setname }} make ${{ inputs.zip }}.info >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo '---' >> $GITHUB_STEP_SUMMARY
Expand Down Expand Up @@ -121,9 +121,9 @@ jobs:
- name: ReBuild1
id: rebuild
run: |
TILENAME=${{ inputs.setname }} make -f Makefile.tiles ${{ inputs.setname }}_tile_list_chunks
TILENAME=${{ inputs.setname }} timeout 300m make -f Makefile.tiles ${{ inputs.zip }}.info && echo "done=true" >> "$GITHUB_OUTPUT" || echo "done=false" >> "$GITHUB_OUTPUT"
TILENAME=${{ inputs.tileset }} make -f Makefile.tiles ${{ inputs.zip }}.sha256
TILENAME=${{ inputs.setname }} make ${{ inputs.setname }}_tile_list_chunks
TILENAME=${{ inputs.setname }} timeout 300m make ${{ inputs.zip }}.info && echo "done=true" >> "$GITHUB_OUTPUT" || echo "done=false" >> "$GITHUB_OUTPUT"
TILENAME=${{ inputs.tileset }} make ${{ inputs.zip }}.sha256
- name: Show work
if: steps.rebuild.outputs.done == 'true'
Expand All @@ -132,7 +132,7 @@ jobs:
echo '```' >> $GITHUB_STEP_SUMMARY
#unzip -l ${{ inputs.zip }} *.dsf >> $GITHUB_STEP_SUMMARY
echo "COMPLETED?: ${{ steps.rebuild.outputs.done }}" >> $GITHUB_STEP_SUMMARY
TILENAME=${{ inputs.setname }} make -f Makefile.tiles ${{ inputs.zip }}.info >> $GITHUB_STEP_SUMMARY
TILENAME=${{ inputs.setname }} make ${{ inputs.zip }}.info >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo '---' >> $GITHUB_STEP_SUMMARY
Expand Down Expand Up @@ -194,9 +194,9 @@ jobs:
- name: ReBuild2
id: rebuild
run: |
TILENAME=${{ inputs.setname }} make -f Makefile.tiles ${{ inputs.setname }}_tile_list_chunks
TILENAME=${{ inputs.setname }} timeout 300m make -f Makefile.tiles ${{ inputs.zip }}.info && echo "done=true" >> "$GITHUB_OUTPUT" || echo "done=false" >> "$GITHUB_OUTPUT"
TILENAME=${{ inputs.tileset }} make -f Makefile.tiles ${{ inputs.zip }}.sha256
TILENAME=${{ inputs.setname }} make ${{ inputs.setname }}_tile_list_chunks
TILENAME=${{ inputs.setname }} timeout 300m make ${{ inputs.zip }}.info && echo "done=true" >> "$GITHUB_OUTPUT" || echo "done=false" >> "$GITHUB_OUTPUT"
TILENAME=${{ inputs.tileset }} make ${{ inputs.zip }}.sha256
- name: Show work
if: steps.rebuild.outputs.done == 'true'
Expand All @@ -205,7 +205,7 @@ jobs:
echo '```' >> $GITHUB_STEP_SUMMARY
#unzip -l ${{ inputs.zip }} *.dsf >> $GITHUB_STEP_SUMMARY
echo "COMPLETED?: ${{ steps.rebuild.outputs.done }}" >> $GITHUB_STEP_SUMMARY
TILENAME=${{ inputs.setname }} make -f Makefile.tiles ${{ inputs.zip }}.info >> $GITHUB_STEP_SUMMARY
TILENAME=${{ inputs.setname }} make ${{ inputs.zip }}.info >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo '---' >> $GITHUB_STEP_SUMMARY
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Gen tile sub-lists
id: chunks
run: |
TILENAME=${{ inputs.tileset }} make -f Makefile.tiles ${{ inputs.tileset }}_tile_list_chunks
TILENAME=${{ inputs.tileset }} make ${{ inputs.tileset }}_tile_list_chunks
CHUNKS=$(ls ${{ inputs.tileset }}_tile_list.* | awk -F '.' '/.+/ { printf "%s\"z_${{ inputs.tileset }}_%s.zip\"", sep, ""$2""; sep=", " }')
#CHUNKS=$(ls ${{ inputs.tileset }}_tile_list.* | awk -v ORS=',' '{print $1}')
echo "chunks={\"chunk\":[$CHUNKS]}" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-one-tile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Build
id: build
run: |
timeout 20m make -f Makefile.tiles z_aosingle_${{ inputs.tile }}.zip
timeout 20m make z_aosingle_${{ inputs.tile }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Gen tile sub-lists
id: chunks
run: |
TILENAME=test make -f Makefile.tiles test_tile_list_chunks
TILENAME=test make test_tile_list_chunks
CHUNKS=$(ls test_tile_list.* | awk -F '.' '/.+/ { printf "%s\"z_test_%s.zip\"", sep, ""$2""; sep=", " }')
echo "chunks={\"chunk\":[$CHUNKS]}" >> $GITHUB_OUTPUT
Expand Down
8 changes: 4 additions & 4 deletions Makefile.tiles → Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
# Quick start:
# Generate tile set:
# export TILENAME=test # or na, afr, eur, ...
# make -f Makefile.tiles clean
# make -f Makefile.tiles ${TILENAME}_tile_list_chunks
# make -f Makefile.tiles -j $(nproc --ignore=2)
# make clean
# make ${TILENAME}_tile_list_chunks
# make -j $(nproc --ignore=2)
#
# Generate single tile:
# make -f Makefile.tiles z_ao__single_+78+015.zip
# make z_ao__single_+78+015.zip

# remove make builtin rules for more useful make -d
MAKEFLAGS += --no-builtin-rules
Expand Down

0 comments on commit 1c3eabc

Please sign in to comment.