11name : test
22on :
33 pull_request :
4- push :
5- branches :
6- - main
4+ push : { branches: [ 'main' ] }
75defaults :
8- run :
9- shell : bash
6+ run : { shell: bash }
107jobs :
118 linux :
129 runs-on : ubuntu-latest
@@ -25,52 +22,39 @@ jobs:
2522 - swift:5.5-centos8
2623 - swift:5.5-amazonlinux2
2724 - swiftlang/swift:nightly-main-focal
28- dependent :
29- - fluent-sqlite-driver
3025 container : ${{ matrix.image }}
3126 steps :
3227 - name : Install Ubuntu dependencies
33- run : apt-get -q update && apt-get -q install -y libsqlite3-dev
3428 if : ${{ endsWith(matrix.image, 'xenial') || endsWith(matrix.image, 'bionic') || endsWith(matrix.image, 'focal') }}
35- - name : Install CentOS deps
36- run : dnf install -y sqlite-devel
37- if : ${{ endsWith(matrix.image, 'centos7') || endsWith(matrix.image, 'centos8') }}
38- - name : Workaround SPM incompatibility with old Git on CentOS 7
39- if : ${{ contains(matrix.swiftos, 'centos7') }}
40- run : |
41- yum install -y make libcurl-devel
42- git clone https://github.com/git/git -bv2.33.1 --depth 1 && cd git
43- make prefix=/usr -j all install NO_OPENSSL=1 NO_EXPAT=1 NO_TCLTK=1 NO_GETTEXT=1 NO_PERL=1
29+ run : apt-get -q update && apt-get -q install -y libsqlite3-dev
4430 - name : Update CentOS/AmazonLinux2's too-old SQLite
45- if : ${{ endsWith(matrix.image, 'centos7') || endsWith(matrix.image, 'centos8') || endsWith(matrix.image, 'amazonlinux2') }}
46- working-directory : /root
31+ if : ${{ contains(matrix.image, 'centos') || contains(matrix.image, 'amazon') }}
4732 # Cribbed from the Fedora RPM, leaves out a lot. System's Tcl is too old to run SQLite's tests.
4833 run : |
49- yum install -y sqlite-devel
50- yum install -y file tcl-devel make
34+ yum update -y && yum install -y sqlite-devel file tcl-devel make
5135 curl -L 'https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release' | tar xz && cd sqlite
5236 export CFLAGS="-DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_SECURE_DELETE=1"
5337 ./configure --prefix=/usr --libdir=/usr/lib64 --enable-fts3 --enable-all --with-tcl=/usr/lib64
5438 make all install
39+ - name : Workaround SPM incompatibility with old Git on CentOS 7
40+ if : ${{ endsWith(matrix.swiftos, 'centos7') }}
41+ run : |
42+ yum install -y make libcurl-devel
43+ git clone https://github.com/git/git -bv2.33.1 --depth 1 && cd git
44+ make prefix=/usr -j all install NO_OPENSSL=1 NO_EXPAT=1 NO_TCLTK=1 NO_GETTEXT=1 NO_PERL=1
5545 - name : Checkout code
5646 uses : actions/checkout@v2
57- with :
58- path : sqlite-kit
47+ with : { path: 'sqlite-kit' }
5948 - name : Check out dependent
6049 uses : actions/checkout@v2
61- with :
62- repository : vapor/${{ matrix.dependent }}
63- path : dependent
50+ with : { repository: 'vapor/fluent-sqlite-driver', path: dependent }
6451 - name : Use local package
65- run : swift package edit sqlite-kit --path ../sqlite-kit
66- working-directory : dependent
52+ run : swift package --package-path dependent edit sqlite-kit --path sqlite-kit
6753 - name : Run SQLiteKit tests with Thread Sanitizer
68- run : swift test --enable-test-discovery --sanitize=thread
69- working-directory : sqlite-kit
54+ run : swift test --package-path sqlite-kit --enable-test-discovery --sanitize=thread
7055 - name : Run dependent tests with Thread Sanitizer
71- run : swift test --enable-test-discovery --sanitize=thread
72- working-directory : dependent
73- macOS :
56+ run : swift test --package-path dependent --enable-test-discovery --sanitize=thread
57+ macos :
7458 runs-on : macos-11
7559 steps :
7660 - name : Select latest available Xcode
0 commit comments