Skip to content

Commit

Permalink
upgrade version to 0.2.3 and enable github action build
Browse files Browse the repository at this point in the history
  • Loading branch information
htynkn committed Jun 23, 2020
1 parent 265af7d commit 432cec4
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 3 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,49 @@
name: CI


on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
ramips-mt7620:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Build ipk
run: docker build . -t htynkn/openwrt-switch-lan-play:latest

- name: Copy ipk
run: docker run -v $PWD:/opt/mount --rm --entrypoint cp htynkn/openwrt-switch-lan-play:latest /sdk/openwrt-sdk/target.zip /opt/mount/target-ramips-mt7620.zip
- name: Check files
run: ls

- name: Save ipk
uses: actions/upload-artifact@v1
with:
name: ramips-mt7620
path: target-ramips-mt7620.zip

ramips-mt7621:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Build ipk
run: docker build --build-arg sdkURL=https://downloads.openwrt.org/releases/19.07.3/targets/ramips/mt7621/openwrt-sdk-19.07.3-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64.tar.xz . -t htynkn/openwrt-switch-lan-play:latest

- name: Copy ipk
run: docker run -v $PWD:/opt/mount --rm --entrypoint cp htynkn/openwrt-switch-lan-play:latest /sdk/openwrt-sdk/target.zip /opt/mount/target-ramips-mt7621.zip
- name: Check files
run: ls

- name: Save ipk
uses: actions/upload-artifact@v1
with:
name: ramips-mt7621
path: target-ramips-mt7621.zip
24 changes: 24 additions & 0 deletions Dockerfile
@@ -0,0 +1,24 @@
FROM ubuntu:16.04

RUN apt-get update && apt-get install bzip2 file python gcc g++ libncurses5-dev gawk zip xz-utils wget libgetopt-complete-perl make cmake git -y -qq

ARG sdkURL=https://downloads.openwrt.org/releases/19.07.3/targets/ramips/mt7620/openwrt-sdk-19.07.3-ramips-mt7620_gcc-7.5.0_musl.Linux-x86_64.tar.xz
ENV sdkURL ${sdkURL}

RUN echo ${sdkURL}
RUN wget -q ${sdkURL} -O /sdk.tar.xz && mkdir /sdk && tar -xf /sdk.tar.xz -C /sdk && cp -R /sdk/openwrt-* /sdk/openwrt-sdk

WORKDIR /sdk/openwrt-sdk
RUN cp feeds.conf.default feeds.conf && echo "src-git openwrt_switch_lan_play https://github.com/htynkn/openwrt-switch-lan-play.git" >> feeds.conf

RUN ./scripts/feeds update -a && ./scripts/feeds install -a
RUN wget https://raw.githubusercontent.com/torvalds/linux/v4.7/scripts/kconfig/merge_config.sh && chmod +x merge_config.sh
RUN make defconfig
RUN echo "CONFIG_PACKAGE_luci-app-switch-lan-play=y" >> .config-fragment
RUN echo "CONFIG_PACKAGE_switch-lan-play=y" >> .config-fragment

RUN ./merge_config.sh -m .config .config-fragment


RUN make package/luci-app-switch-lan-play/compile && make package/switch-lan-play/compile
RUN find . | grep lan-play | grep ipk | xargs zip -ur target.zip
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -21,7 +21,7 @@ To play with your friends, you and your friends should run the ``switch-lan-play
To build switch-lan-play for OpenWrt, first add this feed to your ``feeds.conf`` in a fully set-up OpenWrt SDK [(read here on how to setup the OpenWrt SDK)](https://openwrt.org/docs/guide-developer/using_the_sdk):

```
src-git openwrt_switch_lan_play https://github.com/nlroel/openwrt-switch-lan-play.git
src-git openwrt_switch_lan_play https://github.com/htynkn/openwrt-switch-lan-play.git
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a
Expand Down
4 changes: 2 additions & 2 deletions package/switch-lan-play/Makefile
Expand Up @@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=switch-lan-play
PKG_VERSION:=0.2.1
PKG_VERSION:=0.2.3
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/spacemeowx2/switch-lan-play.git
PKG_MIRROR_HASH:=1c26ca61bc35b35c4900a103edee41d138d64b8d
PKG_MIRROR_HASH:=c0c663e3fdc95d6d6e8ab401caa2bfb5b5872e00
#PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

PKG_LICENSE:=GPLv3
Expand Down

0 comments on commit 432cec4

Please sign in to comment.