forked from rsim/oracle-enhanced
-
Notifications
You must be signed in to change notification settings - Fork 2
99 lines (96 loc) · 3.62 KB
/
ruby_head.yml
File metadata and controls
99 lines (96 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: ruby_head
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
name: "ruby-${{ matrix.ruby }}-${{ matrix.jit }}"
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.jit == 'zjit' }}
strategy:
fail-fast: false
matrix:
ruby: ['head', 'debug', 'asan']
jit: ['none', 'yjit', 'zjit']
env:
CI: true
RUBY_YJIT_ENABLE: ${{ matrix.jit == 'yjit' && '1' || '0' }}
RUBYOPT: "-W2 --debug-frozen-string-literal${{ matrix.jit == 'zjit' && ' --zjit' || '' }}"
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
TNS_ADMIN: ./ci/network/admin
DATABASE_NAME: FREEPDB1
TZ: Europe/Riga
DATABASE_SYS_PASSWORD: Oracle18
DATABASE_HOST: localhost
DATABASE_PORT: 1521
services:
oracle:
image: gvenzl/oracle-free:latest
ports:
- 1521:1521
env:
TZ: Europe/Riga
ORACLE_PASSWORD: Oracle18
options: >-
--health-cmd healthcheck.sh
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
- name: Show Ruby version and JIT status
run: ruby -v
- name: Create symbolic link for libaio library compatibility
run: |
sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
- name: Download Oracle instant client
run: |
wget -q https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip
wget -q https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
wget -q https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linuxx64.zip
- name: Install Oracle instant client
run: |
sudo unzip -q instantclient-basic-linuxx64.zip -d /opt/oracle/
sudo unzip -qo instantclient-sdk-linuxx64.zip -d /opt/oracle/
sudo unzip -qo instantclient-sqlplus-linuxx64.zip -d /opt/oracle/
ORACLE_HOME=$(find /opt/oracle -name "instantclient_*" -type d | head -1)
echo "ORACLE_HOME=$ORACLE_HOME" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$ORACLE_HOME" >> $GITHUB_ENV
echo "$ORACLE_HOME" >> $GITHUB_PATH
- name: Install JDBC Driver
run: |
cp "$ORACLE_HOME/ojdbc17.jar" ./lib/
- name: Create database user
run: |
./ci/setup_accounts.sh
- name: Force client TZ data to match server (ORA_TZFILE workaround)
run: |
ORACLE_CONTAINER=$(docker ps --filter "ancestor=gvenzl/oracle-free" -q)
SRC=$(docker exec "$ORACLE_CONTAINER" bash -c 'ls $ORACLE_HOME/oracore/zoneinfo/timezlrg_*.dat 2>/dev/null | head -1')
echo "Server TZ file: $SRC"
DST_DIR="$ORACLE_HOME/oracore/zoneinfo"
sudo mkdir -p "$DST_DIR"
docker cp "$ORACLE_CONTAINER":"$SRC" /tmp/_server_tzfile.dat
sudo mv /tmp/_server_tzfile.dat "$DST_DIR/$(basename "$SRC")"
ls -l "$DST_DIR"
echo "ORA_TZFILE=$DST_DIR/$(basename "$SRC")" >> $GITHUB_ENV
- name: Bundle install
run: |
bundle install --jobs 4 --retry 3
- name: Show Gemfile.lock
run: |
cat Gemfile.lock
- name: Run RSpec
run: |
bundle exec rspec
- name: Run bug report templates
run: |
cd guides/bug_report_templates
ruby active_record_gem.rb
ruby active_record_gem_spec.rb