Skip to content

Commit

Permalink
[test] symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
MadSchemas committed May 28, 2024
1 parent 8363da8 commit 4112863
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
build:
strategy:
matrix:
os: [macos-13]
os: [macos-latest]
fail-fast: false
runs-on: ${{matrix.os}}
env:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
make -j4
STRIP=/bin/true cpack
- name: 'C++ tests'
if: ${{ matrix.os == 'macos-13' }}
if: ${{ matrix.os == 'macos-latest' }}
run: |
echo "Running C++ directly in this job due to Action's problem with artifacts transition for macos-11 and macos-12 runners"
cd build
Expand All @@ -60,7 +60,7 @@ jobs:
test:
strategy:
matrix:
os: [macos-13]
os: [macos-latest]
test: ['GO']
fail-fast: false
runs-on: ${{matrix.os}}
Expand All @@ -72,50 +72,52 @@ jobs:
TEST: ${{matrix.test}}
steps:
- name: Checkout repository
if: ${{ matrix.os != 'macos-13' || matrix.test == 'GO' }}
if: ${{ matrix.os != 'macos-latest' || matrix.test == 'GO' }}
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
if: ${{ matrix.os == 'macos-13' }}
if: ${{ matrix.os == 'macos-latest' }}
with:
go-version: '1.22.x'
check-latest: true
# - name: Set LD_LIBRARY_PATH
# run: echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/homebrew/lib" >> $GITHUB_ENV
- name: Download ${{matrix.os}}${{matrix.sanitizer}} Artifacts
if: ${{ matrix.os != 'macos-13' || matrix.test == 'GO' }}
if: ${{ matrix.os != 'macos-latest' || matrix.test == 'GO' }}
uses: actions/download-artifact@v4
with:
name: ${{matrix.os}}${{matrix.sanitizer}}
- name: 'Untar Artifacts'
if: ${{ matrix.os != 'macos-13' || matrix.test == 'GO' }}
if: ${{ matrix.os != 'macos-latest' || matrix.test == 'GO' }}
run: tar -xvf artifacts.tar
- name: Prepare Environment
if: ${{ matrix.os != 'macos-13' || matrix.test == 'GO' }}
if: ${{ matrix.os != 'macos-latest' || matrix.test == 'GO' }}
env:
OS: ${{matrix.os}}
run: |
if [[ $OS == ubuntu* ]]; then
sudo ./dependencies.sh
else
./dependencies.sh
go env
find / -name libleveldb* 2>/dev/null
#go env
#find / -name libleveldb* 2>/dev/null
ln -s /opt/homebrew/lib/libsnappy.dylib /usr/local/lib/libsnappy.dylib || true
ln -s /opt/homebrew/lib/libleveldb.a /usr/local/lib/libleveldb.a || true
fi
if [[ $TEST == 'GO' ]]; then
go mod download
elif [[ $OS == ubuntu* ]]; then
./.github/workflows/install_gtest_parallel.sh
fi
- name: Tests
if: ${{ matrix.os != 'macos-13' || matrix.test == 'GO' }}
if: ${{ matrix.os != 'macos-latest' || matrix.test == 'GO' }}
run: |
if [[ $TEST == 'GO' ]]; then
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/homebrew/lib
export PATH=\$PATH:/opt/homebrew/lib
echo $LD_LIBRARY_PATH
echo $PATH
go env
#export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/homebrew/lib
#export PATH=\$PATH:/opt/homebrew/lib
#echo $LD_LIBRARY_PATH
#echo $PATH
#go env
if [[ -z "${{matrix.sanitizer}}" ]]; then
go test -timeout 15m ./test/... -bench . -benchmem -benchtime 100ms -seedcount=50000
else
Expand Down

0 comments on commit 4112863

Please sign in to comment.