Build Rebol #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Build 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: | |
windows: | |
strategy: | |
fail-fast: true | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rebol | |
uses: oldes/[email protected] | |
- name: Build 64bit Rebol/Base using MSVC | |
run: | | |
./rebol3 siskin.r3 rebol --msvc %rebol3-base-windows-x64 | |
MOVE ./tree/rebol/Rebol/msvc/Release-x64/rebol3-base-windows-x64.exe ./ | |
- name: Build 64bit Rebol/Core using MSVC | |
run: | | |
./rebol3 siskin.r3 rebol --msvc %rebol3-core-windows-x64 | |
MOVE ./tree/rebol/Rebol/msvc/Release-x64/rebol3-core-windows-x64.exe ./ | |
- name: Build 64bit Rebol/Bulk using MSVC | |
run: | | |
./rebol3 siskin.r3 rebol --msvc %rebol3-bulk-windows-x64 | |
MOVE ./tree/rebol/Rebol/msvc/Release-x64/rebol3-bulk-windows-x64.exe ./ | |
- name: Build 32bit Rebol/Base using MSVC | |
run: | | |
./rebol3 siskin.r3 rebol --msvc %rebol3-base-windows-x86 | |
MOVE ./tree/rebol/Rebol/msvc/Release-Win32/rebol3-base-windows-x86.exe ./ | |
- name: Build 32bit Rebol/Core using MSVC | |
run: | | |
./rebol3 siskin.r3 rebol --msvc %rebol3-core-windows-x86 | |
MOVE ./tree/rebol/Rebol/msvc/Release-Win32/rebol3-core-windows-x86.exe ./ | |
- name: Build 32bit Rebol/Bulk using MSVC | |
run: | | |
./rebol3 siskin.r3 rebol --msvc %rebol3-bulk-windows-x86 | |
MOVE ./tree/rebol/Rebol/msvc/Release-Win32/rebol3-bulk-windows-x86.exe ./ | |
############################################################################### | |
# Building Rebol as a shared library... | |
- name: Build 32bit Rebol/Core as a shared library using MSVC | |
run: ./rebol3 siskin.r3 rebol --msvc %lib-rebol3-core-windows-x86 | |
- name: Build 64bit Rebol/Core as a shared library using MSVC | |
run: ./rebol3 siskin.r3 rebol --msvc %lib-rebol3-core-windows-x64 | |
############################################################################### | |
# Building sample host applications using Rebol as a shared library... | |
- name: Build 32bit Rebol/Core as a host application using MSVC | |
run: ./rebol3 siskin.r3 rebol --msvc %host-core-windows-x86 | |
- name: Build 64bit Rebol/Core as a host application using MSVC | |
run: ./rebol3 siskin.r3 rebol --msvc %host-core-windows-x64 | |
- name: Move library and host files into root | |
run: | | |
MOVE ./tree/rebol/Rebol/msvc/Release-Win32/lib-rebol3-core-windows-x86.dll ./ | |
MOVE ./tree/rebol/Rebol/msvc/Release-Win32/lib-rebol3-core-windows-x86.lib ./ | |
MOVE ./tree/rebol/Rebol/msvc/Release-Win32/host-core-windows-x86.exe ./ | |
MOVE ./tree/rebol/Rebol/msvc/Release-x64/lib-rebol3-core-windows-x64.dll ./ | |
MOVE ./tree/rebol/Rebol/msvc/Release-x64/lib-rebol3-core-windows-x64.lib ./ | |
MOVE ./tree/rebol/Rebol/msvc/Release-x64/host-core-windows-x64.exe ./ | |
############################################################################### | |
# Collecting build artifacts... | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Rebol-${{github.run_id}} | |
path: ./rebol3-*.exe | |
# and lib/host variant... | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Rebol-${{github.run_id}} | |
path: ./lib-*.dll | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Rebol-${{github.run_id}} | |
path: ./lib-*.lib | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Rebol-${{github.run_id}} | |
path: ./host-*.exe | |
linux: | |
strategy: | |
fail-fast: true | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rebol | |
uses: oldes/[email protected] | |
- name: Install GCC multilib | |
run: sudo apt-get install gcc-multilib | |
- name: Build 32bit Rebol/Base using gcc | |
run: ./rebol3 siskin.r3 rebol %rebol3-base-linux-x86 | |
- name: Build 32bit Rebol/Core using gcc | |
run: ./rebol3 siskin.r3 rebol %rebol3-core-linux-x86 | |
- name: Build 32bit Rebol/Bulk using gcc | |
run: ./rebol3 siskin.r3 rebol %rebol3-bulk-linux-x86 | |
- name: Build 64bit Rebol/Base using gcc | |
run: ./rebol3 siskin.r3 rebol %rebol3-base-linux-x64 | |
- name: Build 64bit Rebol/Core using gcc | |
run: ./rebol3 siskin.r3 rebol %rebol3-core-linux-x64 | |
- name: Build 64bit Rebol/Bulk using gcc | |
run: ./rebol3 siskin.r3 rebol %rebol3-bulk-linux-x64 | |
- name: Setup arm cross-compilers | |
run: | | |
sudo apt-get update | |
sudo apt-get install gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu | |
- name: Build Rebol/Base for armv6 (gnueabi) | |
run: ./rebol3 siskin.r3 rebol %rebol3-base-linux-gnueabi | |
- name: Build Rebol/Core for armv6 (gnueabi) | |
run: ./rebol3 siskin.r3 rebol %rebol3-core-linux-gnueabi | |
- name: Build Rebol/Bulk for armv6 (gnueabi) | |
run: ./rebol3 siskin.r3 rebol %rebol3-bulk-linux-gnueabi | |
- name: Build Rebol/Base for armv7 (gnueabihf) | |
run: ./rebol3 siskin.r3 rebol %rebol3-base-linux-gnueabihf | |
- name: Build Rebol/Core for armv7 (gnueabihf) | |
run: ./rebol3 siskin.r3 rebol %rebol3-core-linux-gnueabihf | |
- name: Build Rebol/Bulk for armv7 (gnueabihf) | |
run: ./rebol3 siskin.r3 rebol %rebol3-bulk-linux-gnueabihf | |
- name: Build Rebol/Base for arm64 (aarch64) | |
run: ./rebol3 siskin.r3 rebol %rebol3-base-linux-aarch64 | |
- name: Build Rebol/Core for arm64 (aarch64) | |
run: ./rebol3 siskin.r3 rebol %rebol3-core-linux-aarch64 | |
- name: Build Rebol/Bulk for arm64 (aarch64) | |
run: ./rebol3 siskin.r3 rebol %rebol3-bulk-linux-aarch64 | |
- name: Rename ARM cross-compilation target results | |
run: | | |
mv ./tree/rebol/Rebol/build/rebol3-base-linux-gnueabi ./tree/rebol/Rebol/build/rebol3-base-linux-armv6 | |
mv ./tree/rebol/Rebol/build/rebol3-core-linux-gnueabi ./tree/rebol/Rebol/build/rebol3-core-linux-armv6 | |
mv ./tree/rebol/Rebol/build/rebol3-bulk-linux-gnueabi ./tree/rebol/Rebol/build/rebol3-bulk-linux-armv6 | |
mv ./tree/rebol/Rebol/build/rebol3-base-linux-gnueabihf ./tree/rebol/Rebol/build/rebol3-base-linux-armv7 | |
mv ./tree/rebol/Rebol/build/rebol3-core-linux-gnueabihf ./tree/rebol/Rebol/build/rebol3-core-linux-armv7 | |
mv ./tree/rebol/Rebol/build/rebol3-bulk-linux-gnueabihf ./tree/rebol/Rebol/build/rebol3-bulk-linux-armv7 | |
mv ./tree/rebol/Rebol/build/rebol3-base-linux-aarch64 ./tree/rebol/Rebol/build/rebol3-base-linux-arm64 | |
mv ./tree/rebol/Rebol/build/rebol3-core-linux-aarch64 ./tree/rebol/Rebol/build/rebol3-core-linux-arm64 | |
mv ./tree/rebol/Rebol/build/rebol3-bulk-linux-aarch64 ./tree/rebol/Rebol/build/rebol3-bulk-linux-arm64 | |
- name: Create archives from each version | |
run: | | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-base-linux-x86 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-core-linux-x86 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-bulk-linux-x86 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-base-linux-x64 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-core-linux-x64 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-bulk-linux-x64 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-base-linux-armv6 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-core-linux-armv6 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-bulk-linux-armv6 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-base-linux-armv7 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-core-linux-armv7 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-bulk-linux-armv7 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-base-linux-arm64 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-core-linux-arm64 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-bulk-linux-arm64 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Rebol-${{github.run_id}} | |
path: ./tree/rebol/Rebol/build/rebol3-*.gz | |
macos: | |
runs-on: macos-12 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rebol | |
uses: oldes/[email protected] | |
- name: Install the Apple certificate | |
# https://docs.github.com/en/actions/guides/installing-an-apple-certificate-on-macos-runners-for-xcode-development | |
env: | |
BUILD_CERTIFICATE_BASE64: ${{ secrets.MACOS_CERTIFICATE }} | |
P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
run: | | |
# create variables | |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | |
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | |
# import certificate from secrets | |
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH | |
# create temporary keychain | |
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | |
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
# import certificate to keychain | |
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
security list-keychain -d user -s $KEYCHAIN_PATH | |
# list available codesigning identities | |
security find-identity -v -p codesigning | |
- name: Build 64bit Rebol/Base using clang | |
run: ./rebol3 siskin.r3 rebol %rebol3-base-macos-x64 | |
- name: Build 64bit Rebol/Core using clang | |
run: ./rebol3 siskin.r3 rebol %rebol3-core-macos-x64 | |
- name: Build 64bit Rebol/Bulk using clang | |
run: ./rebol3 siskin.r3 rebol %rebol3-bulk-macos-x64 | |
- name: Build ARM64 Rebol/Base using clang | |
run: ./rebol3 siskin.r3 rebol %rebol3-base-macos-arm64 | |
- name: Build ARM64 Rebol/Core using clang | |
run: ./rebol3 siskin.r3 rebol %rebol3-core-macos-arm64 | |
- name: Build ARM64 Rebol/Bulk using clang | |
run: ./rebol3 siskin.r3 rebol %rebol3-bulk-macos-arm64 | |
- name: Build 64bit Rebol/Core as a shared library | |
run: ./rebol3 siskin.r3 rebol %lib-rebol3-core-macos-x64 | |
- name: Build 64bit Rebol/Core as a host application | |
run: ./rebol3 siskin.r3 rebol %host-core-macos-x64 | |
- name: Codesign executables | |
env: | |
MACOS_IDENTITY_ID: ${{ secrets.MACOS_IDENTITY_ID }} | |
run: | | |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./tree/rebol/Rebol/build/rebol3-base-macos-x64 -v | |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./tree/rebol/Rebol/build/rebol3-core-macos-x64 -v | |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./tree/rebol/Rebol/build/rebol3-bulk-macos-x64 -v | |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./tree/rebol/Rebol/build/rebol3-base-macos-arm64 -v | |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./tree/rebol/Rebol/build/rebol3-core-macos-arm64 -v | |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./tree/rebol/Rebol/build/rebol3-bulk-macos-arm64 -v | |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./tree/rebol/Rebol/build/lib-rebol3-core-macos-x64.dylib -v | |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./tree/rebol/Rebol/build/host-core-macos-x64 -v | |
- name: Create archives from each version | |
run: | | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-base-macos-x64 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-core-macos-x64 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-bulk-macos-x64 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-base-macos-arm64 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-core-macos-arm64 | |
gzip -9 ./tree/rebol/Rebol/build/rebol3-bulk-macos-arm64 | |
gzip -9 ./tree/rebol/Rebol/build/lib-rebol3-core-macos-x64.dylib | |
gzip -9 ./tree/rebol/Rebol/build/host-core-macos-x64 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Rebol-${{github.run_id}} | |
path: ./tree/rebol/Rebol/build/*.gz | |