Skip to content

Commit

Permalink
Build all HaikuOS Rebol versions using GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Mar 6, 2023
1 parent 22fcdc7 commit ce7ea60
Show file tree
Hide file tree
Showing 6 changed files with 197 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/build-haiku-rebol.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: 'Build Haiku Rebol'
on:
# Triggers the workflow on push or pull request events but only for the master branch
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
Rebol-Haiku-x86:
strategy:
fail-fast: false
runs-on: ubuntu-latest
env:
TAG: alpine
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Install Siskin Builder
uses: oldes/[email protected]

- name: Download Haiku Rebol-dev container
run: docker pull docker.io/oldes/rebol-dev:haiku-x86

- name: Build all Rebol versions for Haiku OS x86
run: ./siskin Rebol-Docker.nest rebol-haiku-x86

- uses: actions/upload-artifact@v3
with:
name: Rebol-Haiku-x86
path: ./haiku/*.gz

Rebol-Haiku-x86_64:
strategy:
fail-fast: false
runs-on: ubuntu-latest
env:
TAG: alpine
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Install Siskin Builder
uses: oldes/[email protected]

- name: Download Haiku Rebol-dev container
run: docker pull docker.io/oldes/rebol-dev:haiku-x64

- name: Build all Rebol versions for Haiku OS x86_64
run: ./siskin Rebol-Docker.nest rebol-haiku-x64

- uses: actions/upload-artifact@v3
with:
name: Rebol-Haiku-x64
path: ./haiku/*.gz
20 changes: 20 additions & 0 deletions Rebol-Docker.nest
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ eggs: [
cmd %ubuntu/amd64/ {docker build --platform linux/amd64 -t docker.io/oldes/rebol-dev:ubuntu23-x64 -t docker.io/oldes/rebol-dev:ubuntu23-amd64 -f Dockerfile-23-dev .}
cmd %ubuntu/amd64/ {docker run --platform linux/amd64 --rm docker.io/oldes/rebol-dev:ubuntu23-x64 rebol -v}
]
"Docker Image: Rebol-dev - Haiku OS (x86)" [
name: %haiku-rebol-dev-x86
cmd %haiku/ {docker build --platform linux/i386 -t docker.io/oldes/rebol-dev:haiku-x86 -f Dockerfile-x86 .}
cmd %haiku/ {docker run --platform linux/i386 --rm docker.io/oldes/rebol-dev:haiku-x86 rebol -v}
]
"Docker Image: Rebol-dev - Haiku OS (x64)" [
name: %haiku-rebol-dev-x64
cmd %haiku/ {docker build --platform linux/x86_64 -t docker.io/oldes/rebol-dev:haiku-x64 -f Dockerfile-x64 .}
cmd %haiku/ {docker run --platform linux/x86_64 --rm docker.io/oldes/rebol-dev:haiku-x64 rebol -v}
]

;--------------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -207,4 +217,14 @@ eggs: [
cmd %ubuntu/amd64/ {chmod +x ./build-rebol-ubuntu23-amd64.sh}
cmd %ubuntu/amd64/ {docker run --rm --platform linux/amd64 -v $PWD:/out/ docker.io/oldes/rebol-dev:ubuntu23-amd64 /out/build-rebol-ubuntu23-amd64.sh}
]
"Build all Rebol versions: Haiku (x86)" [
name: %rebol-haiku-x86
cmd %haiku/ {chmod +x ./build-rebol-haiku-x86.sh}
cmd %haiku/ {docker run --rm --platform linux/i386 -v $PWD:/out/ docker.io/oldes/rebol-dev:haiku-x86 /out/build-rebol-haiku-x86.sh}
]
"Build all Rebol versions: Haiku (x64)" [
name: %rebol-haiku-x64
cmd %haiku/ {chmod +x ./build-rebol-haiku-x64.sh}
cmd %haiku/ {docker run --rm --platform linux/amd64 -v $PWD:/out/ docker.io/oldes/rebol-dev:haiku-x64 /out/build-rebol-haiku-x64.sh}
]
]
28 changes: 28 additions & 0 deletions haiku/Dockerfile-x64
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM --platform=linux/x86_64 haiku/cross-compiler:x86_64-r1beta4 AS Haiku-dev-x64

WORKDIR /rebol
ENV REBOL_HOME=/rebol


RUN wget https://github.com/Oldes/Rebol3/releases/download/3.10.3/rebol3-core-linux-x64.gz
RUN gunzip ./rebol3* && mv ./rebol3* /bin/rebol && chmod +x /bin/rebol

RUN git clone https://github.com/Siskin-framework/Builder.git --depth 1

RUN wget https://eu.hpkg.haiku-os.org/haikuports/master/x86_64/current/packages/libiconv_devel-1.17-3-x86_64.hpkg \
&& wget https://eu.hpkg.haiku-os.org/haikuports/master/x86_64/current/packages/libiconv-1.17-3-x86_64.hpkg \
&& package extract -C /system libiconv-1.17-3-x86_64.hpkg \
&& package extract -C /system libiconv_devel-1.17-3-x86_64.hpkg \
&& rm *.hpkg \
&& cd /system/lib \
&& ln -s libiconv.so.2 libiconv.so \
&& cd /rebol

#RUN rebol siskin.r3 rebol 21
#vi tree/rebol/Rebol/make/rebol3.nest
#ls -la /system/lib/libiconv*
#ln -s libiconv.so.2 libiconv.so
CMD "/bin/sh"
#CMD "rebol siskin.r3 rebol 21"


26 changes: 26 additions & 0 deletions haiku/Dockerfile-x86
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM --platform=linux/i386 haiku/cross-compiler:x86_gcc2h-r1beta4 AS Haiku-dev-x86

WORKDIR /rebol
ENV REBOL_HOME=/rebol


RUN wget https://github.com/Oldes/Rebol3/releases/download/3.10.3/rebol3-core-linux-x86.gz
RUN gunzip ./rebol3* && mv ./rebol3* /bin/rebol && chmod +x /bin/rebol

RUN git clone https://github.com/Siskin-framework/Builder.git --depth 1

RUN wget https://eu.hpkg.haiku-os.org/haikuports/master/x86_gcc2/current/packages/libiconv_devel-1.17-3-x86_gcc2.hpkg \
&& wget https://eu.hpkg.haiku-os.org/haikuports/master/x86_gcc2/current/packages/libiconv-1.17-3-x86_gcc2.hpkg \
&& package extract -C /system libiconv-1.17-3-x86_gcc2.hpkg \
&& package extract -C /system libiconv_devel-1.17-3-x86_gcc2.hpkg \
&& rm *.hpkg \
&& cd /system/lib \
&& ln -s libiconv.so.2 libiconv.so \
&& cd /rebol

#RUN rebol siskin.r3 rebol 21
#vi tree/rebol/Rebol/make/rebol3.nest
#ls -la /system/lib/libiconv*
#ln -s libiconv.so.2 libiconv.so
CMD "/bin/sh"
#CMD "rebol siskin.r3 rebol 21"
26 changes: 26 additions & 0 deletions haiku/build-rebol-haiku-x64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

# this script is supposed to be run from rebol-dev container!!!

export ARCH=x64

cd /rebol/Builder/
git pull
/bin/rebol siskin.r3 rebol rebol3-base-haiku-$ARCH
mv ./tree/rebol/Rebol/build/rebol3-base-haiku-$ARCH /out/rebol3-base-haiku-$ARCH

/bin/rebol siskin.r3 rebol rebol3-core-haiku-$ARCH
mv ./tree/rebol/Rebol/build/rebol3-core-haiku-$ARCH /out/rebol3-core-haiku-$ARCH

/bin/rebol siskin.r3 rebol rebol3-bulk-haiku-$ARCH
mv ./tree/rebol/Rebol/build/rebol3-bulk-haiku-$ARCH /out/rebol3-bulk-haiku-$ARCH

chmod a+x /out/rebol3-base-haiku-$ARCH
chmod a+x /out/rebol3-core-haiku-$ARCH
chmod a+x /out/rebol3-bulk-haiku-$ARCH
/out/rebol3-base-haiku-$ARCH -v
/out/rebol3-core-haiku-$ARCH -v
/out/rebol3-bulk-haiku-$ARCH -v
gzip -9 /out/rebol3-base-haiku-$ARCH
gzip -9 /out/rebol3-core-haiku-$ARCH
gzip -9 /out/rebol3-bulk-haiku-$ARCH
26 changes: 26 additions & 0 deletions haiku/build-rebol-haiku-x86.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

# this script is supposed to be run from rebol-dev container!!!

export ARCH=x86

cd /rebol/Builder/
git pull
/bin/rebol siskin.r3 rebol rebol3-base-haiku-$ARCH
mv ./tree/rebol/Rebol/build/rebol3-base-haiku-$ARCH /out/rebol3-base-haiku-$ARCH

/bin/rebol siskin.r3 rebol rebol3-core-haiku-$ARCH
mv ./tree/rebol/Rebol/build/rebol3-core-haiku-$ARCH /out/rebol3-core-haiku-$ARCH

/bin/rebol siskin.r3 rebol rebol3-bulk-haiku-$ARCH
mv ./tree/rebol/Rebol/build/rebol3-bulk-haiku-$ARCH /out/rebol3-bulk-haiku-$ARCH

chmod a+x /out/rebol3-base-haiku-$ARCH
chmod a+x /out/rebol3-core-haiku-$ARCH
chmod a+x /out/rebol3-bulk-haiku-$ARCH
/out/rebol3-base-haiku-$ARCH -v
/out/rebol3-core-haiku-$ARCH -v
/out/rebol3-bulk-haiku-$ARCH -v
gzip -9 /out/rebol3-base-haiku-$ARCH
gzip -9 /out/rebol3-core-haiku-$ARCH
gzip -9 /out/rebol3-bulk-haiku-$ARCH

0 comments on commit ce7ea60

Please sign in to comment.