Skip to content

Commit

Permalink
Add separate build job in CI (maplibre#438)
Browse files Browse the repository at this point in the history
This PR adds a separate build job in CI and installs OpenSSL for Windows
runner. Closes maplibre#437
  • Loading branch information
stepankuzmin committed Oct 22, 2022
1 parent e48cd33 commit 2e19408
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,48 @@ jobs:
./tests/vtzero-check function_source_query_params.pbf
./tests/vtzero-show function_source_query_params.pbf
build:
needs: [test]
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
include:
- os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
bin: martin
name: martin-Linux-x86_64.tar.gz
- os: windows-latest
rust: stable
target: x86_64-pc-windows-msvc
bin: martin.exe
name: martin-Windows-x86_64.zip
- os: macOS-latest
rust: stable
target: x86_64-apple-darwin
bin: martin
name: martin-Darwin-x86_64.tar.gz
runs-on: ${{ matrix.os }}
steps:
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
target: ${{ matrix.target }}
- name: Checkout
uses: actions/checkout@v3
- name: Install OpenSSL
if: matrix.os == 'windows-latest'
run: |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
vcpkg install openssl:x64-windows-static-md
- name: Run build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ matrix.target }}

docker:
needs: [test]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -278,6 +320,11 @@ jobs:
target: ${{ matrix.target }}
- name: Checkout
uses: actions/checkout@v3
- name: Install OpenSSL
if: matrix.os == 'windows-latest'
run: |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
vcpkg install openssl:x64-windows-static-md
- name: Run build
uses: actions-rs/cargo@v1
with:
Expand Down

0 comments on commit 2e19408

Please sign in to comment.