Skip to content

Commit

Permalink
add workflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
gtxaspec committed Apr 4, 2024
1 parent e90c6b5 commit a600fd4
Showing 1 changed file with 91 additions and 0 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/pru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# "Imitation is the sincerest form of flattery that mediocrity can pay to greatness."

name: prudynt-t
on:
workflow_dispatch:

env:
TAG_NAME: release

jobs:
buildroot:
name: prudynt
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: 'true'

- name: Setup cache directories
run: |
mkdir -p /tmp/ccache
ln -s /tmp/ccache ${HOME}/.ccache
- name: Setup ccache
uses: actions/cache@v4
if: always()
with:
path: /tmp/ccache
key: ${{ runner.os }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-
- name: Setup repo sources for GCC13
run: |
sudo echo "deb http://archive.ubuntu.com/ubuntu/ lunar main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
sudo tee -a /etc/apt/preferences.d/prefer-jammy <<EOF
Package: *
Pin: release a=jammy
Pin-Priority: 500
Package: *
Pin: release a=lunar
Pin-Priority: 100
EOF
- name: Update system sources
run: |
sudo apt-get update
- name: Install build dependencies
run: |
sudo apt-get install -y --no-install-recommends --no-install-suggests build-essential bc bison cpio curl file flex git libncurses-dev make rsync unzip wget whiptail gcc gcc-mipsel-linux-gnu lzop u-boot-tools ca-certificates ccache
- name: Install GCC13 dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests libc6=2.37-0ubuntu2 libc-bin=2.37-0ubuntu2 libc6-mipsel-cross=2.37-0ubuntu1cross1 libc6-dev=2.37-0ubuntu2 libc-dev-bin=2.37-0ubuntu2 coreutils=9.1-1ubuntu2 libgmp10=2:6.2.1+dfsg1-1.1ubuntu1
- name: Download toolchain
run: |
wget https://github.com/themactep/thingino-firmware/releases/download/toolchain/thingino-toolchain_xburst1_musl_gcc13-linux-mipsel.tar.gz
tar -xf thingino-toolchain_xburst1_musl_gcc13-linux-mipsel.tar.gz
cd mipsel-thingino-linux-musl_sdk-buildroot; ./relocate-sdk.sh
cd ../
- name: Build deps
run: |
PRUDYNT_CROSS=/home/runner/work/prudynt-t/prudynt-t/mipsel-thingino-linux-musl_sdk-buildroot/bin/mipsel-linux- ./build.sh deps T31 -static
- name: Build prudynt
run: |
PRUDYNT_CROSS=/home/runner/work/prudynt-t/prudynt-t/mipsel-thingino-linux-musl_sdk-buildroot/bin/mipsel-linux- ./build.sh prudynt T31 -static
- name: Upload full firmware as artifact
uses: actions/upload-artifact@v4
with:
name: prudynt-t31
path: |
bin/prudynt
- name: Upload full firmware to release
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@master
with:
tag_name: ${{ env.TAG_NAME }}
files: |
bin/prudynt

0 comments on commit a600fd4

Please sign in to comment.