Skip to content

Commit

Permalink
install lib postal
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Jul 5, 2024
1 parent 6fdf711 commit 613e31b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ env:
GO_VERSION: 1.22.1

jobs:
build-and-release:
name: "Build and Release"
runs-on: ubuntu-latest
build:
name: Build
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -25,7 +28,8 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

- name: Install build packages
- name: Install linux build packages
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update -qq && sudo apt-get install -yq --no-install-recommends \
build-essential \
Expand All @@ -35,7 +39,18 @@ jobs:
libtool \
pkg-config
- name: Install macos build packages
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install curl autoconf automake libtool pkg-config
- name: Install windows build packages
if: ${{ matrix.os == 'windows-latest' }}
run: |
pacman -S autoconf automake curl git make libtool gcc mingw-w64-x86_64-gcc
- name: Install libpostal
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
mkdir /tmp/libpostal_code
mkdir /tmp/libpostal_datadir
Expand All @@ -46,6 +61,10 @@ jobs:
./configure --datadir=/libpostal_datadir
make -j4
sudo make install
- name: Install libpostal
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo ldconfig /usr/local/lib
- name: CLI tests
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ builds:
dir: cli
binary: postal_server
env:
- CGO_ENABLED=0
- CGO_ENABLED=1
goos:
- linux
- windows
Expand Down

0 comments on commit 613e31b

Please sign in to comment.