Skip to content

Commit

Permalink
Merge pull request #347 from TileDB-Inc/phw/improve-github-workflow
Browse files Browse the repository at this point in the history
Make various improvements to our GitHub workflow
  • Loading branch information
NullHypothesis authored Sep 4, 2024
2 parents e4f7c23 + 9250b26 commit 6cb6409
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/install_tiledb_macos.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
set -e -x
curl --location -o tiledb.tar.gz https://github.com/TileDB-Inc/TileDB/releases/download/${CORE_VERSION}/tiledb-macos-x86_64-${CORE_VERSION}-${CORE_HASH}.tar.gz \
curl --location -o tiledb.tar.gz https://github.com/TileDB-Inc/TileDB/releases/download/${CORE_VERSION}/tiledb-macos-arm64-${CORE_VERSION}-${CORE_HASH}.tar.gz \
&& sudo tar -C /usr/local -xSf tiledb.tar.gz
62 changes: 17 additions & 45 deletions .github/workflows/tiledb-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
jobs:
golangci:
name: lint
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Install TileDB because the linter needs the C header files.
Expand All @@ -33,15 +33,15 @@ jobs:
version: latest

Linux_Test:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
# Will be checking following versions
go: ["1.20", "1.21", "1.22"]
go: ["1.20", "1.21", "1.22", "1.23"]
steps:

# Checks out repository
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Log details for the runner. Useful for debugging
- name: Run lscpu for runner details
Expand All @@ -56,20 +56,10 @@ jobs:
# Following action sets up Go and uses the strategy matrix to test on
# specific versions
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go get -t .

Expand All @@ -78,14 +68,14 @@ jobs:
run: go test -v ./...

Macos_Test:
runs-on: macos-12
runs-on: macos-latest
strategy:
matrix:
# Will be checking following versions
go: ["1.20", "1.21", "1.22"]
go: ["1.20", "1.21", "1.22", "1.23"]
steps:
# Checks out repository
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Log details for the runner. Useful for debugging
- name: Run sysctl for runner details
Expand All @@ -100,38 +90,31 @@ jobs:
# Following action sets up Go and uses the strategy matrix to test on
# specific versions
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/Library/Caches/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go get -t .

# Tests TileDB-Go
- name: Test TileDB-Go
run: go test -v ./...
# We need to explicitly pass the path to libtiledb.dylib to Go because of
# changes in recent macOS versions:
# https://github.com/golang/go/issues/36572#issuecomment-817205746
run: CGO_LDFLAGS="-Wl,-rpath,/usr/local/lib" go test -v ./...

Linux_Address_Sanitizer:
# Only run this job for releases
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
# Will be checking following versions
go: ["1.20", "1.21", "1.22"]
go: ["1.20", "1.21", "1.22", "1.23"]
steps:
# Checks out repository
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Log details for the runner. Useful for debugging
- name: Run lscpu for runner details
Expand All @@ -146,21 +129,10 @@ jobs:
# Following action sets up Go and uses the strategy matrix to test on
# specific versions
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-asan
restore-keys: |
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
${{ runner.os }}-go-
- name: Install dependencies
run: go get -t .

Expand Down

0 comments on commit 6cb6409

Please sign in to comment.