Skip to content

Commit

Permalink
# v1.0.0
Browse files Browse the repository at this point in the history
Massive speedup without frameskip
  • Loading branch information
xrip committed Oct 6, 2023
1 parent e5abfd9 commit b768a0a
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 81 deletions.
130 changes: 52 additions & 78 deletions .github/workflows/create-release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,95 +2,69 @@ name: Build and create a release when tag is pushed

# Only deploy when a new tag is pushed
on:
push:
tags:
- "v*.*-alpha"
- "v*.*.*"
# branches: [ master ]
# pull_request:
# branches: [ master ]

# Must match the project() name in CMakeLists.txt
env:
APP_NAME: sms
push:
tags:
- "v*.*-alpha"
- "v*.*.*"
# branches: [ master ]
# pull_request:
# branches: [ master ]

# Allow this workflow to write back to the repository
permissions:
contents: write
contents: write

# Build binary and send to releases
jobs:
build-release:
runs-on: ubuntu-latest
name: Build and release
steps:
- name: Install dependencies
run: |
sudo apt update && \
sudo apt install -y git python3 && \
sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential libusb-1.0-0-dev
- name: Check out this repository
uses: actions/checkout@v3
build-release:
runs-on: ubuntu-latest
name: Build and release
steps:

- name: Install dependencies
run: |
sudo apt update && \
sudo apt install -y git python3 && \
sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential libusb-1.0-0-dev
- name: Check out this repository
uses: actions/checkout@v3

- name: Print Working directory
run: echo $HOME && pwd && ls -la
- name: Print Working directory
run: echo $HOME && pwd && ls -la

- name: Update line containing pico_set_program_version() in CMakelists.txt with tag name.
run: |
# Extract the tag name that triggered the event and remove the 'refs/tags/' prefix
input_string=${{ github.ref }}
prefix="refs/tags/"
tag="No versioninfo found"
if [[ $input_string == $prefix* ]]; then
echo "The string starts with 'refs/tags/'."
tag="${input_string#$prefix}"
echo "Tag is ${tag}"
sed -i "s/^[[:space:]]*pico_set_program_version(.*/pico_set_program_version(${{ env.APP_NAME }} \"$tag\")/" CMakeLists.txt
else
echo "The string does not start with 'refs/tags/'."
fi
grep "pico_set_program_version" CMakeLists.txt
- name: Install Pico SDk
run: |
cd $HOME && \
git clone https://github.com/raspberrypi/pico-sdk.git --branch master && \
cd pico-sdk/ && \
git submodule update --init
- name: Install Pico SDk
run: |
cd $HOME && \
git clone --depth 1 https://github.com/raspberrypi/pico-sdk.git --branch master && \
cd pico-sdk/ && \
git submodule update --init
- name: Install picotool
run: |
cd $HOME && \
export PICO_SDK_PATH=$HOME/pico-sdk && \
git clone https://github.com/raspberrypi/picotool.git --branch master && \
cd picotool/ && \
mkdir build && \
cd build && \
cmake .. && \
make
- name: Build the basic version
run: |
export PICO_SDK_PATH=$HOME/pico-sdk && \
mkdir build && cd build && \
cmake .. && make
- name: Build the project
run: |
export PICO_SDK_PATH=$HOME/pico-sdk && \
mkdir build && cd build && \
cmake .. && \
make
- name: Build the overclocked versions
run: |
cd build && \
cmake -DOVERCLOCKING=288 .. && make && \
cmake -DOVERCLOCKING=300 .. && make && \
cmake -DOVERCLOCKING=312 .. && make && \
cmake -DOVERCLOCKING=333 .. && make && \
cmake -DOVERCLOCKING=366 .. && make && \
cmake -DOVERCLOCKING=396 .. && make && \
cmake -DOVERCLOCKING=412 .. && make
- name: Show release info using picotool
run: |
export PICO_SDK_PATH=$HOME/pico-sdk && \
$HOME/picotool/build/picotool info bin/${{ env.APP_NAME }}.uf2 && \
echo "-----------------------------"
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
bin/${{ env.APP_NAME }}.uf2
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
bin/Release/**.uf2
body_path: CHANGELOG.md
body_path: CHANGELOG.md


5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v1.0.1

Sound enabled. Realy usable only near to maximum overclock.
Release with different overclocking profiles.

# v1.0.0

Massive speedup without frameskip
Expand Down
19 changes: 16 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,22 @@ add_executable(sms

pico_set_program_name(sms "sms Emulator for MURMULATOR devboard")
pico_set_program_version(sms "v0.1")
pico_define_boot_stage2(slower_boot2 ${PICO_DEFAULT_BOOT_STAGE2_FILE})
target_compile_definitions(slower_boot2 PRIVATE PICO_FLASH_SPI_CLKDIV=4)
pico_set_boot_stage2(${PROJECT_NAME} slower_boot2)

if(OVERCLOCKING)
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}-${OVERCLOCKING}MHz")

target_compile_definitions(${PROJECT_NAME} PRIVATE OVERCLOCKING=${OVERCLOCKING})

pico_define_boot_stage2(slower_boot2 ${PICO_DEFAULT_BOOT_STAGE2_FILE})
target_compile_definitions(slower_boot2 PRIVATE PICO_FLASH_SPI_CLKDIV=4)
pico_set_boot_stage2(${PROJECT_NAME} slower_boot2)

message(STATUS "==================================")
message(STATUS "Overclocking ${OVERCLOCKING}MHz enabled")
message(STATUS "==================================")
message(STATUS "")
endif ()


target_include_directories(sms PRIVATE TotalSMS)

Expand Down

0 comments on commit b768a0a

Please sign in to comment.