Skip to content

build on macOS to test if reproducible #105

build on macOS to test if reproducible

build on macOS to test if reproducible #105

Workflow file for this run

name: ci
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install dependencies
run: |
sudo apt install -y clang-format
npm i -g pnpm
pnpm i
- name: Lint
run: ./scripts/lint.sh
build:
runs-on: ${{ matrix.os }}
needs: lint
env:
EMSCRIPTEN_VERSION: '3.1.74'
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-24.04 }
- { os: macos-15 }
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install dependencies (Ubuntu)
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: |
sudo apt install -y \
ninja-build \
gettext
- name: Install dependencies (macOS)
if: ${{ matrix.os == 'macos-15' }}
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: |
brew install ninja gnu-tar
- name: Install node dependencies
run: |
npm i -g pnpm
pnpm i
pnpm --prefix=fcitx5-webview i
- name: Install emsdk
run: |
git clone https://github.com/emscripten-core/emsdk
cd emsdk
./emsdk install ${{ env.EMSCRIPTEN_VERSION }}
./emsdk activate ${{ env.EMSCRIPTEN_VERSION }}
- name: Build
run: |
./scripts/install-deps.sh
. emsdk/emsdk_env.sh
emcmake cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release
EMCC_FORCE_STDLIBS=libc++ FCITX_DISTRIBUTION=fcitx5-js cmake --build build
npm pack
cd build/destdir/usr && tar cjvf ../../../fcitx5-js-dev.tar.bz2 include lib
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.os }}
path: |
fcitx5-js.tgz
fcitx5-js-dev.tar.bz2
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
compare:
needs: build
if: ${{ github.ref != 'refs/heads/master' }}
uses: ./.github/workflows/compare.yml
release:
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
pattern: artifact-ubuntu*
merge-multiple: true
- name: Release
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: "Nightly Build"
files: |
fcitx5-js.tgz
fcitx5-js-dev.tar.bz2