Skip to content

Commit

Permalink
chore: actions
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Nov 18, 2024
1 parent 89ea214 commit fffbab5
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
run: |
cd libs-carto/cartocss/util
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cd build
make css2xml
mv css2xml css2xml_${{ env.PLATFORM }}
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/build_css2xml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build CartoMobileSDK css2xml tool

on:
workflow_dispatch:

jobs:
build:
strategy:
matrix:
variant: ['android', 'ios']
runs-on: ${{ matrix.variant == 'android' && 'ubuntu-latest' || 'macos-latest' }}
name: css2xml ${{ matrix.variant }}
steps:

- name: Runner platform name
run: |
export PLATFORM_UP=${{ runner.os }}
echo "PLATFORM_UP=$PLATFORM_UP"
echo "PLATFORM=$(echo "$PLATFORM_UP" | tr "[:upper:]" "[:lower:]")" >>${GITHUB_ENV}
echo "PLATFORM=${{ env.PLATFORM }}"
- name: ensure dist
run: |
mkdir dist
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: maxim-lobanov/setup-xcode@v1
if: matrix.variant != 'android'


- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2

- name: fetch externals
run: |
git submodule update --init --remote --recursive
- name: Install build tools
if: matrix.variant == 'android'
run: |
sudo apt-get install autoconf automake libtool build-essential
- name: Install build tools
if: matrix.variant != 'android'
run: |
brew install autoconf automake libtool
- name: prepare boost
run: |
wget https://boostorg.jfrog.io/artifactory/main/release/1.85.0/source/boost_1_85_0.zip
unzip boost_1_85_0.zip
ln -s ../boost_1_85_0 libs-external/boost
cd boost_1_85_0
./bootstrap.sh
./b2 headers
- name: Build CSS2XML
run: |
cd libs-carto/cartocss/util
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cd build
make css2xml
mv css2xml css2xml_${{ env.PLATFORM }}
zip ../../../../dist/css2xml_${{ env.PLATFORM }}.zip css2xml_${{ env.PLATFORM }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
path: dist/css2xml_*.zip

0 comments on commit fffbab5

Please sign in to comment.