From 9a4bac0795b9176231bcd2343e6768bcae05e8e3 Mon Sep 17 00:00:00 2001 From: Red and Green <62441426+RGGH@users.noreply.github.com> Date: Wed, 13 Nov 2024 17:12:33 +0000 Subject: [PATCH 1/8] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 84dfbd1..d4b9930 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ +[![Rust](https://github.com/RGGH/mif/actions/workflows/rust.yml/badge.svg)](https://github.com/RGGH/mif/actions/workflows/rust.yml) + +# Adventures in frame buffers + +[x] image to bytes +[x] collision detection + ![image](https://github.com/user-attachments/assets/841e855f-37fc-4941-a779-e6fe92fbdd1c) From 6d6b96724c7896218040f2555a718e81dbf07ae0 Mon Sep 17 00:00:00 2001 From: Red and Green <62441426+RGGH@users.noreply.github.com> Date: Wed, 13 Nov 2024 17:16:31 +0000 Subject: [PATCH 2/8] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d4b9930..7cc5be5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ # Adventures in frame buffers -[x] image to bytes -[x] collision detection +## Features +- [x] image to bytes +- [x] collision detection +- [ ] display score - Bitmap Font for Digits ![image](https://github.com/user-attachments/assets/841e855f-37fc-4941-a779-e6fe92fbdd1c) From 1c6522b27cc51c404b1cc80a373047c25459395a Mon Sep 17 00:00:00 2001 From: Red and Green <62441426+RGGH@users.noreply.github.com> Date: Wed, 13 Nov 2024 19:35:00 +0000 Subject: [PATCH 3/8] Create cross_comp_ubuntu.yaml --- .github/workflows/cross_comp_ubuntu.yaml | 51 ++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/cross_comp_ubuntu.yaml diff --git a/.github/workflows/cross_comp_ubuntu.yaml b/.github/workflows/cross_comp_ubuntu.yaml new file mode 100644 index 0000000..fd66251 --- /dev/null +++ b/.github/workflows/cross_comp_ubuntu.yaml @@ -0,0 +1,51 @@ +name: Rust Cross Compile for Ubuntu Linux + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + component: rustfmt + + - name: Install cross + run: cargo install cross + + - name: Build for Ubuntu Linux (x86_64) + run: cross build --target x86_64-unknown-linux-gnu --release + + - name: Upload artifact for Ubuntu Linux + uses: actions/upload-artifact@v3 + with: + name: ubuntu-build + path: target/x86_64-unknown-linux-gnu/release/mif + + - name: Create GitHub Release + id: create_release + uses: softprops/action-gh-release@v1 + with: + files: target/x86_64-unknown-linux-gnu/release/mif + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload release assets + uses: softprops/action-gh-release@v1 + with: + files: target/x86_64-unknown-linux-gnu/release/mif + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From cd8bfacf06679d2359809ed6d0ccfd25264d7ff1 Mon Sep 17 00:00:00 2001 From: Red and Green <62441426+RGGH@users.noreply.github.com> Date: Wed, 13 Nov 2024 19:39:42 +0000 Subject: [PATCH 4/8] Update cross_comp_ubuntu.yaml --- .github/workflows/cross_comp_ubuntu.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/cross_comp_ubuntu.yaml b/.github/workflows/cross_comp_ubuntu.yaml index fd66251..39485d6 100644 --- a/.github/workflows/cross_comp_ubuntu.yaml +++ b/.github/workflows/cross_comp_ubuntu.yaml @@ -29,6 +29,15 @@ jobs: - name: Build for Ubuntu Linux (x86_64) run: cross build --target x86_64-unknown-linux-gnu --release + - name: Create a new tag + id: tag + run: | + TAG="v$(date +'%Y%m%d%H%M%S')" # Example tag format: vYYYYMMDDHHMMSS + git tag $TAG + git push origin $TAG + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload artifact for Ubuntu Linux uses: actions/upload-artifact@v3 with: @@ -40,6 +49,7 @@ jobs: uses: softprops/action-gh-release@v1 with: files: target/x86_64-unknown-linux-gnu/release/mif + tag_name: ${{ steps.tag.outputs.TAG }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -47,5 +57,7 @@ jobs: uses: softprops/action-gh-release@v1 with: files: target/x86_64-unknown-linux-gnu/release/mif + tag_name: ${{ steps.tag.outputs.TAG }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + From b1739d2ef875fd3232dd686c886607536a5611ce Mon Sep 17 00:00:00 2001 From: Red and Green <62441426+RGGH@users.noreply.github.com> Date: Wed, 13 Nov 2024 19:49:37 +0000 Subject: [PATCH 5/8] Update cross_comp_ubuntu.yaml --- .github/workflows/cross_comp_ubuntu.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cross_comp_ubuntu.yaml b/.github/workflows/cross_comp_ubuntu.yaml index 39485d6..f1b35a1 100644 --- a/.github/workflows/cross_comp_ubuntu.yaml +++ b/.github/workflows/cross_comp_ubuntu.yaml @@ -34,6 +34,7 @@ jobs: run: | TAG="v$(date +'%Y%m%d%H%M%S')" # Example tag format: vYYYYMMDDHHMMSS git tag $TAG + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git git push origin $TAG env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -60,4 +61,3 @@ jobs: tag_name: ${{ steps.tag.outputs.TAG }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - From 08bd47c6b40055565c90f0727d8afdc33a0770cd Mon Sep 17 00:00:00 2001 From: Red and Green <62441426+RGGH@users.noreply.github.com> Date: Wed, 13 Nov 2024 19:58:52 +0000 Subject: [PATCH 6/8] Update cross_comp_ubuntu.yaml --- .github/workflows/cross_comp_ubuntu.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cross_comp_ubuntu.yaml b/.github/workflows/cross_comp_ubuntu.yaml index f1b35a1..0cc8395 100644 --- a/.github/workflows/cross_comp_ubuntu.yaml +++ b/.github/workflows/cross_comp_ubuntu.yaml @@ -8,6 +8,9 @@ on: branches: - main +permissions: + contents: write # Ensure this allows pushing tags and commits + jobs: build: runs-on: ubuntu-latest From d2ad09866e149d2240585e5704c2a4c5be1b3e06 Mon Sep 17 00:00:00 2001 From: Red and Green <62441426+RGGH@users.noreply.github.com> Date: Wed, 13 Nov 2024 20:07:19 +0000 Subject: [PATCH 7/8] Update cross_comp_ubuntu.yaml --- .github/workflows/cross_comp_ubuntu.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cross_comp_ubuntu.yaml b/.github/workflows/cross_comp_ubuntu.yaml index 0cc8395..8d22548 100644 --- a/.github/workflows/cross_comp_ubuntu.yaml +++ b/.github/workflows/cross_comp_ubuntu.yaml @@ -39,6 +39,7 @@ jobs: git tag $TAG git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git git push origin $TAG + echo "TAG=$TAG" >> $GITHUB_ENV # Set the tag as an environment variable for later use env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -53,7 +54,7 @@ jobs: uses: softprops/action-gh-release@v1 with: files: target/x86_64-unknown-linux-gnu/release/mif - tag_name: ${{ steps.tag.outputs.TAG }} + tag_name: ${{ env.TAG }} # Pass the tag name from environment variable env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -61,6 +62,7 @@ jobs: uses: softprops/action-gh-release@v1 with: files: target/x86_64-unknown-linux-gnu/release/mif - tag_name: ${{ steps.tag.outputs.TAG }} + tag_name: ${{ env.TAG }} # Ensure the tag is passed here too env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + From 1cde87757fb319569e09949522b5250e47ef20ac Mon Sep 17 00:00:00 2001 From: Red and Green <62441426+RGGH@users.noreply.github.com> Date: Wed, 13 Nov 2024 20:13:40 +0000 Subject: [PATCH 8/8] Update cross_comp_ubuntu.yaml --- .github/workflows/cross_comp_ubuntu.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cross_comp_ubuntu.yaml b/.github/workflows/cross_comp_ubuntu.yaml index 8d22548..2382c6d 100644 --- a/.github/workflows/cross_comp_ubuntu.yaml +++ b/.github/workflows/cross_comp_ubuntu.yaml @@ -35,7 +35,7 @@ jobs: - name: Create a new tag id: tag run: | - TAG="v$(date +'%Y%m%d%H%M%S')" # Example tag format: vYYYYMMDDHHMMSS + TAG="Ubuntu" # Set the tag to "Ubuntu" for consistency git tag $TAG git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git git push origin $TAG @@ -65,4 +65,3 @@ jobs: tag_name: ${{ env.TAG }} # Ensure the tag is passed here too env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -