[Toybox] GitHub Action Example

Eric Molitor emolitor at molitor.org
Sat Jun 6 05:35:46 PDT 2020


Hi Rob,
Here is an example github action building toybox and running tests on
MacOS, Ubuntu and Alpine. It builds nightly at 2:00am and on each push and
pull request. While I'm not a huge fan of proprietary CI systems GitHub
isn't too invasive and supports MacOS. You can see an example of the output
at https://github.com/emolitor/toybox/actions

diff --git a/.github/workflows/toybox.yml b/.github/workflows/toybox.yml
new file mode 100644
index 00000000..cd18e7fe
--- /dev/null
+++ b/.github/workflows/toybox.yml
@@ -0,0 +1,53 @@
+name: toybox CI
+
+on:
+  schedule:
+    - cron:  '0 2 * * *'
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  MacOS-10_15:
+    runs-on: macos-10.15
+
+    steps:
+    - uses: actions/checkout at v2
+    - name: Setup
+      run: brew install gnu-sed
+    - name: Configure
+      run: make macos_defconfig
+    - name: Build
+      run: make
+    - name: Test
+      run: make tests
+
+  Ubuntu-20_04:
+    runs-on: ubuntu-20.04
+
+    steps:
+    - uses: actions/checkout at v2
+    - name: Setup
+      run: sudo apt-get install build-essential
+    - name: Configure
+      run: make defconfig
+    - name: Build
+      run: make
+    - name: Test
+      run: make tests
+
+  Alpine-3_12:
+    runs-on: ubuntu-20.04
+    container: alpine:3.12
+
+    steps:
+    - uses: actions/checkout at v2
+    - name: Setup
+      run: apk add build-base linux-headers diffutils findutils bash
+    - name: Configure
+      run: make defconfig
+    - name: Build
+      run: make
+    - name: Test
+      run: make tests
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20200606/54864eb9/attachment.html>


More information about the Toybox mailing list