Skip to content

Commit

Permalink
CHANGE: more detailed info about used compilation target; new build o…
Browse files Browse the repository at this point in the history
…utput names; rewritten build specification to be better prepared for a future cross-compilation possibility.
  • Loading branch information
Oldes committed Nov 5, 2021
1 parent 2b7b6cf commit 04c71d1
Show file tree
Hide file tree
Showing 6 changed files with 240 additions and 219 deletions.
112 changes: 56 additions & 56 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,56 +23,56 @@ jobs:

- name: Build 64bit Rebol/Base using MSVC
run: |
./siskin.exe make/rebol3.nest [msvc %rebol3-base-x64-gcc]
MOVE ./msvc/Release-x64/rebol3-base-x64-vs.exe ./
./siskin.exe make/rebol3.nest [msvc %rebol3-base-windows-x64]
MOVE ./msvc/Release-x64/rebol3-base-windows-x64-vs.exe ./
- name: Build 64bit Rebol/Core using MSVC
run: |
./siskin.exe make/rebol3.nest [msvc %rebol3-core-x64-gcc]
MOVE ./msvc/Release-x64/rebol3-core-x64-vs.exe ./
./siskin.exe make/rebol3.nest [msvc %rebol3-core-windows-x64]
MOVE ./msvc/Release-x64/rebol3-core-windows-x64-vs.exe ./
- name: Build 64bit Rebol/Bulk using MSVC
run: |
./siskin.exe make/rebol3.nest [msvc %rebol3-bulk-x64-clang]
MOVE ./msvc/Release-x64/rebol3-bulk-x64-vs.exe ./
./siskin.exe make/rebol3.nest [msvc %rebol3-bulk-windows-x64]
MOVE ./msvc/Release-x64/rebol3-bulk-windows-x64-vs.exe ./
- name: Build 32bit Rebol/Base using MSVC
run: |
./siskin.exe make/rebol3.nest [msvc %rebol3-base-x86-gcc]
MOVE ./msvc/Release-Win32/rebol3-base-x86-vs.exe ./
./siskin.exe make/rebol3.nest [msvc %rebol3-base-windows-x86]
MOVE ./msvc/Release-Win32/rebol3-base-windows-x86-vs.exe ./
- name: Build 32bit Rebol/Core using MSVC
run: |
./siskin.exe make/rebol3.nest [msvc %rebol3-core-x86-gcc]
MOVE ./msvc/Release-Win32/rebol3-core-x86-vs.exe ./
./siskin.exe make/rebol3.nest [msvc %rebol3-core-windows-x86]
MOVE ./msvc/Release-Win32/rebol3-core-windows-x86-vs.exe ./
- name: Build 32bit Rebol/Bulk using MSVC
run: |
./siskin.exe make/rebol3.nest [msvc %rebol3-bulk-x86-clang]
MOVE ./msvc/Release-Win32/rebol3-bulk-x86-vs.exe ./
./siskin.exe make/rebol3.nest [msvc %rebol3-bulk-windows-x86]
MOVE ./msvc/Release-Win32/rebol3-bulk-windows-x86-vs.exe ./
###############################################################################
# Building Rebol as a shared library...
- name: Build 32bit Rebol/Core as a shared library using MSVC
run: ./siskin.exe make/rebol3.nest [msvc %lib-rebol3-core-x86-gcc]
run: ./siskin.exe make/rebol3.nest [msvc %lib-rebol3-core-windows-x86]
- name: Build 64bit Rebol/Core as a shared library using MSVC
run: ./siskin.exe make/rebol3.nest [msvc %lib-rebol3-core-x64-gcc]
run: ./siskin.exe make/rebol3.nest [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: ./siskin.exe make/rebol3.nest [msvc %host-core-x86-gcc]
run: ./siskin.exe make/rebol3.nest [msvc %host-core-windows-x86]
- name: Build 64bit Rebol/Core as a host application using MSVC
run: ./siskin.exe make/rebol3.nest [msvc %host-core-x64-gcc]
run: ./siskin.exe make/rebol3.nest [msvc %host-core-windows-x64]

- name: Move library and host files into root
run: |
MOVE ./msvc/Release-Win32/lib-rebol3-core-x86-vs.dll ./
MOVE ./msvc/Release-Win32/lib-rebol3-core-x86-vs.lib ./
MOVE ./msvc/Release-Win32/host-core-x86-vs.exe ./
MOVE ./msvc/Release-x64/lib-rebol3-core-x64-vs.dll ./
MOVE ./msvc/Release-x64/lib-rebol3-core-x64-vs.lib ./
MOVE ./msvc/Release-x64/host-core-x64-vs.exe ./
MOVE ./msvc/Release-Win32/lib-rebol3-core-windows-x86-vs.dll ./
MOVE ./msvc/Release-Win32/lib-rebol3-core-windows-x86-vs.lib ./
MOVE ./msvc/Release-Win32/host-core-windows-x86-vs.exe ./
MOVE ./msvc/Release-x64/lib-rebol3-core-windows-x64-vs.dll ./
MOVE ./msvc/Release-x64/lib-rebol3-core-windows-x64-vs.lib ./
MOVE ./msvc/Release-x64/host-core-windows-x64-vs.exe ./
###############################################################################
# Collecting build artifacts...
Expand Down Expand Up @@ -110,30 +110,30 @@ jobs:
uses: oldes/[email protected]

- name: Build 64bit Rebol/Base using gcc
run: ./siskin make/rebol3.nest %rebol3-base-x64-libc-gcc
run: ./siskin make/rebol3.nest %rebol3-base-linux-x64
- name: Build 64bit Rebol/Core using gcc
run: ./siskin make/rebol3.nest %rebol3-core-x64-libc-gcc
run: ./siskin make/rebol3.nest %rebol3-core-linux-x64
- name: Build 64bit Rebol/Bulk using gcc
run: ./siskin make/rebol3.nest %rebol3-bulk-x64-libc-gcc
- name: Build 64bit Rebol/Base using clang
run: ./siskin make/rebol3.nest %rebol3-base-x64-libc-clang
- name: Build 64bit Rebol/Core using clang
run: ./siskin make/rebol3.nest %rebol3-core-x64-libc-clang
- name: Build 64bit Rebol/Bulk using clang
run: ./siskin make/rebol3.nest %rebol3-bulk-x64-libc-clang
run: ./siskin make/rebol3.nest %rebol3-bulk-linux-x64
# - name: Build 64bit Rebol/Base using clang
# run: ./siskin make/rebol3.nest %rebol3-base-x64-libc-clang
# - name: Build 64bit Rebol/Core using clang
# run: ./siskin make/rebol3.nest %rebol3-core-x64-libc-clang
# - name: Build 64bit Rebol/Bulk using clang
# run: ./siskin make/rebol3.nest %rebol3-bulk-x64-libc-clang

- name: Prepare 64bit Rebol/Base for upload
run: |
mv ./build/rebol3-base-x64-libc-gcc ./rebol3-base-x64-libc
gzip -9 ./rebol3-base-x64-libc
mv ./build/rebol3-base-linux-x64 ./rebol3-base-linux-x64
gzip -9 ./rebol3-base-linux-x64
- name: Prepare 64bit Rebol/Core for upload
run: |
mv ./build/rebol3-core-x64-libc-gcc ./rebol3-core-x64-libc
gzip -9 ./rebol3-core-x64-libc
mv ./build/rebol3-core-linux-x64 ./rebol3-core-linux-x64
gzip -9 ./rebol3-core-linux-x64
- name: Prepare 64bit Rebol/Bulk for upload
run: |
mv ./build/rebol3-bulk-x64-libc-gcc ./rebol3-bulk-x64-libc
gzip -9 ./rebol3-bulk-x64-libc
mv ./build/rebol3-bulk-linux-x64 ./rebol3-bulk-linux-x64
gzip -9 ./rebol3-bulk-linux-x64
- uses: actions/upload-artifact@v2
with:
Expand All @@ -150,16 +150,16 @@ jobs:
uses: oldes/[email protected]

- name: Build 64bit Rebol/Base using clang
run: ./siskin make/rebol3.nest %rebol3-base-x64-osx
run: ./siskin make/rebol3.nest %rebol3-base-macos-x64
- name: Build 64bit Rebol/Core using clang
run: ./siskin make/rebol3.nest %rebol3-core-x64-osx
run: ./siskin make/rebol3.nest %rebol3-core-macos-x64
- name: Build 64bit Rebol/Bulk using clang
run: ./siskin make/rebol3.nest %rebol3-bulk-x64-osx
run: ./siskin make/rebol3.nest %rebol3-bulk-macos-x64

# - name: Build 64bit Rebol/Core as a shared library
# run: ./siskin make/rebol3.nest %lib-rebol3-core-x64-osx
# run: ./siskin make/rebol3.nest %lib-rebol3-core-macos-x64
# - name: Build 64bit Rebol/Core as a host application
# run: ./siskin make/rebol3.nest %host-core-x64-osx
# run: ./siskin make/rebol3.nest %host-core-macos-x64

- name: Install the Apple certificate
# https://docs.github.com/en/actions/guides/installing-an-apple-certificate-on-macos-runners-for-xcode-development
Expand Down Expand Up @@ -187,33 +187,33 @@ jobs:
- name: Codesign executables
env:
MACOS_IDENTITY_ID: ${{ secrets.MACOS_IDENTITY_ID }}
run: |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-base-x64-osx -v
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-core-x64-osx -v
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-bulk-x64-osx -v
run: |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-base-macos-x64 -v
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-core-macos-x64 -v
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-bulk-macos-x64 -v
- name: Prepare 64bit Rebol/Base for upload
run: |
mv ./build/rebol3-base-x64-osx ./rebol3-base-x64-osx
gzip -9 ./rebol3-base-x64-osx
mv ./build/rebol3-base-macos-x64 ./rebol3-base-macos-x64
gzip -9 ./rebol3-base-macos-x64
- name: Prepare 64bit Rebol/Core for upload
run: |
mv ./build/rebol3-core-x64-osx ./rebol3-core-x64-osx
gzip -9 ./rebol3-core-x64-osx
mv ./build/rebol3-core-macos-x64 ./rebol3-core-macos-x64
gzip -9 ./rebol3-core-macos-x64
- name: Prepare 64bit Rebol/Bulk for upload
run: |
mv ./build/rebol3-bulk-x64-osx ./rebol3-bulk-x64-osx
gzip -9 ./rebol3-bulk-x64-osx
mv ./build/rebol3-bulk-macos-x64 ./rebol3-bulk-macos-x64
gzip -9 ./rebol3-bulk-macos-x64
# - name: Prepare 64bit Rebol/Core as a shared library for upload
# run: |
# mv ./build/lib-rebol3-core-x64-osx ./lib-rebol3-core-x64-osx
# gzip -9 ./lib-rebol3-core-x64-osx
# mv ./build/lib-rebol3-core-macos-x64 ./lib-rebol3-core-macos-x64
# gzip -9 ./lib-rebol3-core-macos-x64
# - name: Prepare 64bit Rebol/Core as a host application for upload
# run: |
# mv ./build/host-core-x64-osx ./host-core-x64-osx
# gzip -9 ./host-core-x64-osx
# mv ./build/host-core-macos-x64 ./host-core-macos-x64
# gzip -9 ./host-core-macos-x64

- uses: actions/upload-artifact@v2
with:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
uses: oldes/[email protected]

- name: Build 64bit Rebol/Bulk using MSVC
run: ./siskin.exe make/rebol3.nest [msvc %rebol3-bulk-x64-clang]
run: ./siskin.exe make/rebol3.nest [msvc %rebol3-bulk-windows-x64]

- name: Prepare 64bit Rebol/Bulk for upload
run: MOVE ./msvc/Release-x64/rebol3-bulk-x64-vs.exe ./rebol3-bulk-x64.exe
run: MOVE ./msvc/Release-x64/rebol3-bulk-windows-x64-vs.exe ./rebol3-bulk-windows-x64.exe

- name: Build 64bit test extension using MSVC
run: ./siskin.exe make/rebol3.nest [msvc %test-x64.rebx]
Expand All @@ -34,7 +34,7 @@ jobs:
run: MOVE ./msvc/Release-x64/test-x64.rebx.dll ./test-x64.rebx

- name: Test 64bit Rebol/Bulk
run: ./rebol3-bulk-x64.exe -s ./src/tests/run-tests.r3
run: ./rebol3-bulk-windows-x64.exe -s ./src/tests/run-tests.r3


###############################################################################
Expand All @@ -60,7 +60,7 @@ jobs:
uses: oldes/[email protected]

- name: Build 64bit Rebol/Bulk using gcc
run: ./siskin make/rebol3.nest %rebol3-bulk-x64-libc-gcc
run: ./siskin make/rebol3.nest %rebol3-bulk-linux-x64

- name: Build 64bit test extension using gcc
run: |
Expand All @@ -69,12 +69,12 @@ jobs:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/$PWD/src/tests/
- name: Test 64bit Rebol/Bulk
run: ./build/rebol3-bulk-x64-libc-gcc -s ./src/tests/run-tests.r3
run: ./build/rebol3-bulk-linux-x64 -s ./src/tests/run-tests.r3

- name: Prepare 64bit Rebol/Bulk for upload
run: |
mv ./build/rebol3-bulk-x64-libc-gcc ./rebol3-bulk-x64-libc
gzip -9 ./rebol3-bulk-x64-libc
mv ./build/rebol3-bulk-linux-x64 ./rebol3-bulk-linux-x64
gzip -9 ./rebol3-bulk-linux-x64
#- name: Build 64bit Rebol/Bulk using clang
# run: |
Expand All @@ -97,20 +97,20 @@ jobs:
uses: oldes/[email protected]

- name: Build 64bit Rebol/Bulk using clang
run: ./siskin make/rebol3.nest %rebol3-bulk-x64-osx
run: ./siskin make/rebol3.nest %rebol3-bulk-macos-x64

- name: Build 64bit test extension
run: |
./siskin make/rebol3.nest %test-x64.rebx
cp ./build/test-x64.rebx ./src/tests/
- name: Test 64bit Rebol/Bulk
run: ./build/rebol3-bulk-x64-osx -s ./src/tests/run-tests.r3
run: ./build/rebol3-bulk-macos-x64 -s ./src/tests/run-tests.r3

- name: Prepare 64bit Rebol/Bulk for upload
run: |
mv ./build/rebol3-bulk-x64-osx ./rebol3-bulk-x64-osx
gzip -9 ./rebol3-bulk-x64-osx
mv ./build/rebol3-bulk-macos-x64 ./rebol3-bulk-macos-x64
gzip -9 ./rebol3-bulk-macos-x64
- uses: actions/upload-artifact@v2
with:
Expand Down
103 changes: 67 additions & 36 deletions make/pre-make.r3
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,12 @@ mezz-files: reduce [
version: any [spec/version 3.5.0]
platform: any [spec/platform system/platform]
target: any [spec/target spec/os-target spec/configuration]
os-base: 'win32
product: any [spec/product 'Core]
configs: unique any [spec/config copy []]
stack-size: any [spec/stack-size 1048576] ;default 1MiB


unless target [
; if configuration is not fully provided, try to compose it
; EXAMPLES:
; x86_64-linux-musl
; ppc-apple-darwin
;
vendor: any [
;pc, apple, nvidia, ibm, etc.
all [word? spec/vendor spec/vendor ]
all [word? spec/manufacturer spec/manufacturer ]
]
arch: any [
; list of LLVM (6) targets/archs:
; aarch64 - AArch64 (little endian)
; aarch64_be - AArch64 (big endian)
Expand Down Expand Up @@ -151,31 +145,63 @@ unless target [
; thumb - Thumb
; thumbeb - Thumb (big endian)
; x86 - 32-bit X86: Pentium-Pro and above
; x86-64 - 64-bit X86: EM64T and AMD64
; x86_64 - 64-bit X86: EM64T and AMD64
; xcore - XCore
target: form any [
; i686, x86_64, amd64, arm ...
all [word? spec/arch spec/arch ]
all [word? spec/target-arch spec/target-arch]
all [word? spec/build-type spec/build-type ]
all [word? spec/cpu spec/cpu ]
]
if vendor: any [
;pc, apple, nvidia, ibm, etc.
all [word? spec/vendor spec/vendor ]
all [word? spec/manufacturer spec/manufacturer ]
][
append append target #"-" vendor
]
if sys: any [spec/target-sys spec/kernel][
;none, linux, win32, darwin, cuda, etc.
append append target #"-" sys
]
if abi: any [spec/target-abi spec/abi][
;eabi, gnu, android, macho, elf, etc.
append append target #"-" abi
]
all [word? spec/arch spec/arch ]
all [word? spec/target-arch spec/target-arch]
]
os: any [
all [word? spec/os spec/os]
select #(
Macintosh: macos
Windows: windows
Linux: linux
) platform
]
sys: any [
; none, linux, win32, darwin, cuda, etc.
spec/sys
spec/kernel
select #(
macos: darwin
ios: darwin
windows: win32
linux: linux
) os
]
abi: any [
; eabi, gnu, android, macho, elf, musl etc.
spec/target-abi
spec/abi
select #(
macos: macho
ios: macho
windows: pe
reactos: pe
beos: pe
linux: elf
alpine: musl
) os
]

product: any [spec/product 'Core]
configs: unique any [spec/config copy []]
stack-size: any [spec/stack-size 1048576] ;default 1MiB

unless target [
; if configuration is not fully provided, try to compose it
; EXAMPLES:
; x86_64-linux-musl
; ppc-apple-darwin
;
target: clear ""
if arch [append append target arch #"-"]
if vendor [append append target vendor #"-"]
if sys [append append target sys #"-"]
if abi [append append target abi #"-"]
take/last target
]

;"Rebol Core 4.0.0 Windows x86_64 msvc-19 20-Feb-2021/17:31"
;"Rebol Core 4.0.0 Linux x86_64-linux-gnu gcc 20-Feb-2021/17:31"
;"Rebol Core 4.0.0 Linux x86_64-linux-musl gcc 20-Feb-2021/17:31"
Expand All @@ -189,8 +215,13 @@ str-version: reform [
product ; like Core, View, etc...
version ; triple value product version
platform ; Linux, Windows, macOS, Android...
target
os
arch
vendor
sys
abi
any [all [word? spec/compiler spec/compiler]] ; gcc, clang, msvc...
target
build-date
]

Expand Down
Loading

0 comments on commit 04c71d1

Please sign in to comment.