Rebol/SQLite #8
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: 'Rebol/SQLite' | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rebol | |
uses: oldes/[email protected] | |
- name: Build 32bit Rebol/SQLite extension | |
run: ./rebol3 siskin.r3 rebol/sqlite --msvc sqlite-windows-x86 | |
- name: Prepare 32bit Rebol/SQLite extension | |
run: MOVE ./tree/rebol/Rebol-SQLite/msvc/Release-Win32/sqlite-windows-x86.dll ./sqlite-windows-x86.rebx | |
- name: Build 64bit Rebol/SQLite extension | |
run: ./rebol3 siskin.r3 rebol/sqlite --msvc sqlite-windows-x64 | |
- name: Prepare 64bit Rebol/SQLite extension | |
run: MOVE ./tree/rebol/Rebol-SQLite/msvc/Release-x64/sqlite-windows-x64.dll ./sqlite-windows-x64.rebx | |
- name: Minimal Rebol/SQLite extension test | |
run: | | |
MOVE tree\rebol\Rebol-SQLite\ci-test.r3 .\test-sqlite.r3 | |
./rebol3 test-sqlite.r3 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Rebol-SQLite-${{github.run_id}} | |
path: ./sqlite*.rebx | |
linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rebol | |
uses: oldes/[email protected] | |
- name: Build 64bit Rebol/SQLite extension | |
run: ./rebol3 siskin.r3 rebol/sqlite sqlite-linux-x64 | |
- name: Prepare 64bit Rebol SQLite extension | |
run: mv ./tree/rebol/Rebol-SQLite/build/sqlite-linux-x64.so ./sqlite-linux-x64.rebx | |
- name: Test Rebol/SQLite extension | |
run: | | |
mv ./tree/rebol/Rebol-SQLite/ci-test.r3 ./test-sqlite.r3 | |
./rebol3 test-sqlite.r3 | |
- name: Compress 64bit Rebol/SQLite extension | |
run: gzip -9 ./sqlite-linux-x64.rebx | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Rebol-SQLite-${{github.run_id}} | |
path: ./sqlite*.gz | |
macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rebol | |
uses: oldes/[email protected] | |
- name: Build 64bit Rebol/SQLite extension | |
run: ./rebol3 siskin.r3 rebol/sqlite sqlite-macos-x64 | |
- 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: Codesign executables | |
env: | |
MACOS_IDENTITY_ID: ${{ secrets.MACOS_IDENTITY_ID }} | |
run: | | |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./tree/rebol/Rebol-SQLite/build/sqlite-macos-x64.dylib -v | |
- name: Prepare 64bit Rebol SQLite extension | |
run: mv ./tree/rebol/Rebol-SQLite/build/sqlite-macos-x64.dylib ./sqlite-macos-x64.rebx | |
- name: Test Rebol/SQLite extension | |
run: | | |
mv ./tree/rebol/Rebol-SQLite/ci-test.r3 ./test-sqlite.r3 | |
./rebol3 test-sqlite.r3 | |
- name: Compress 64bit Rebol/SQLite extension | |
run: gzip -9 ./sqlite-macos-x64.rebx | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Rebol-SQLite-${{github.run_id}} | |
path: ./sqlite*.gz |