Skip to content

Commit

Permalink
Merge branch 'main' of github.com:RGGH/mif
Browse files Browse the repository at this point in the history
  • Loading branch information
RGGH committed Nov 14, 2024
2 parents 7bdfad2 + 1cde877 commit b2290b0
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/cross_comp_ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Rust Cross Compile for Ubuntu Linux

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: write # Ensure this allows pushing tags and commits

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: Create a new tag
id: tag
run: |
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
echo "TAG=$TAG" >> $GITHUB_ENV # Set the tag as an environment variable for later use
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- 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
tag_name: ${{ env.TAG }} # Pass the tag name from environment variable
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
tag_name: ${{ env.TAG }} # Ensure the tag is passed here too
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
[![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

## 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)

0 comments on commit b2290b0

Please sign in to comment.