Update ci #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build on macOS-arm | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
- 'changelog.txt' | |
- 'LEGAL' | |
- 'LICENSE' | |
- '.clang-*' | |
- '.gitignore' | |
- '.github/**' | |
- '!.github/workflows/mac-arm.yml' | |
- 'lib/xdg/**' | |
- 'snap/**' | |
- 'docs/**' | |
- 'flatpak/**' | |
- 'vcpkg.json' | |
- 'vcpkg-*.json' | |
- 'src/base/platform/win/**' | |
- 'src/base/platform/linux/**' | |
branches: [ develop, develop-macos ] | |
tags: | |
- "v*.*.*" | |
pull_request: | |
branches: [ develop, develop-macos ] | |
jobs: | |
macos: | |
name: MacOS | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
build_type: [ Release ] | |
env: | |
UPLOAD_ARTIFACT: "false" | |
ONLY_CACHE: "false" | |
PREPARE_PATH: "build-script/prepare-mac.sh" | |
steps: | |
- name: Get repository name. | |
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV | |
- name: Clone. | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
path: ${{ env.REPO_NAME }} | |
- name: First set up. | |
run: | | |
sudo chown -R `whoami`:admin /usr/local/share | |
brew install automake | |
# Disable spotlight. | |
sudo mdutil -a -i off | |
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer | |
- name: Prepare | |
run: | | |
chmod a+x ./$REPO_NAME/$PREPARE_PATH | |
./$REPO_NAME/$PREPARE_PATH | |
- name: Build ok-gloox | |
run: | | |
git clone https://github.com/okstar-org/ok-gloox.git | |
cd ok-gloox | |
cmake -B out -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
cmake --build out --config ${{ matrix.build_type }} | |
sudo cmake --install out --config ${{ matrix.build_type }} | |
- name: Build ok-rtc | |
run: | | |
git clone https://github.com/okstar-org/ok-rtc.git | |
cd ok-rtc | |
git submodule update --init | |
export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig:/usr/local/opt/mozjpeg/lib/pkgconfig:/opt/homebrew/opt/ffmpeg@5/lib/pkgconfig" | |
cmake -B out -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DJPEG_LIBRARY=/usr/local/opt/mozjpeg/lib -DJPEF_INCLUDE_DIR=/usr/local/opt/mozjpeg/include | |
cmake --build out --config=${{ matrix.build_type }} | |
sudo cmake --install out --config ${{ matrix.build_type }} | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: '5.15.2' | |
modules: 'qtwebengine' | |
- name: Set reusable strings | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ env.REPO_NAME }}/${{ github.workspace }}/out" >> "$GITHUB_OUTPUT" | |
- name: CMake Configure | |
run: | | |
export PKG_CONFIG_PATH="/opt/homebrew/opt/openal-soft/lib/pkgconfig:/usr/local/opt/mozjpeg/lib/pkgconfig:/opt/homebrew/opt/ffmpeg@5/lib/pkgconfig" | |
cmake -B ${{ steps.strings.outputs.build-output-dir }} -S ${{ github.workspace }}/${{ env.REPO_NAME }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
- name: CMake Build | |
run: | | |
cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} |