Remove redundant macOS Intel job #11
Workflow file for this run
This file contains hidden or 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: Precompile NIFs | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| # Build and test on x86_64 Linux, cross-compile for other Linux architectures | |
| linux-x86: | |
| name: Linux x86_64 + cross-compile | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| otp: ["25.0", "26.2", "27.2"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.otp }} | |
| elixir-version: "1.18.4" | |
| - name: Install cross-compilation toolchains | |
| run: | | |
| sudo apt-get install -y \ | |
| build-essential cmake libssl-dev \ | |
| gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \ | |
| gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \ | |
| gcc-riscv64-linux-gnu g++-riscv64-linux-gnu \ | |
| gcc-i686-linux-gnu g++-i686-linux-gnu | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Precompile NIFs (native + cross-compile) | |
| run: | | |
| export ELIXIR_MAKE_CACHE_DIR=$(pwd)/cache | |
| mkdir -p $ELIXIR_MAKE_CACHE_DIR | |
| MIX_ENV=prod mix elixir_make.precompile | |
| - name: Upload artifacts to release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: cache/*.tar.gz | |
| draft: true | |
| - name: Run tests on x86_64 | |
| run: mix test --exclude integration | |
| env: | |
| CLICKHOUSE_HOST: localhost | |
| CLICKHOUSE_PORT: 9000 | |
| services: | |
| clickhouse: | |
| image: clickhouse/clickhouse-server:latest | |
| env: | |
| CLICKHOUSE_USER: default | |
| CLICKHOUSE_PASSWORD: "" | |
| CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1 | |
| ports: | |
| - 9000:9000 | |
| - 8123:8123 | |
| options: >- | |
| --health-cmd "clickhouse-client --query 'SELECT 1'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| # Build and test on ARM64 Linux | |
| linux-arm: | |
| name: Linux ARM64 (aarch64) | |
| runs-on: ubuntu-24.04-arm | |
| strategy: | |
| matrix: | |
| otp: ["25.0", "26.2", "27.2"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.otp }} | |
| elixir-version: "1.18.4" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install -y build-essential cmake libssl-dev | |
| mix deps.get | |
| - name: Precompile NIFs | |
| run: | | |
| export ELIXIR_MAKE_CACHE_DIR=$(pwd)/cache | |
| mkdir -p $ELIXIR_MAKE_CACHE_DIR | |
| MIX_ENV=prod mix elixir_make.precompile | |
| - name: Upload artifacts to release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: cache/*.tar.gz | |
| draft: true | |
| - name: Run tests on ARM64 | |
| run: mix test --exclude integration | |
| env: | |
| CLICKHOUSE_HOST: localhost | |
| CLICKHOUSE_PORT: 9000 | |
| services: | |
| clickhouse: | |
| image: clickhouse/clickhouse-server:latest | |
| env: | |
| CLICKHOUSE_USER: default | |
| CLICKHOUSE_PASSWORD: "" | |
| CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1 | |
| ports: | |
| - 9000:9000 | |
| - 8123:8123 | |
| options: >- | |
| --health-cmd "clickhouse-client --query 'SELECT 1'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| # Build and test on macOS Apple Silicon (builds both ARM64 and x86_64) | |
| macos: | |
| name: macOS (ARM64 + x86_64) | |
| runs-on: macos-14 | |
| strategy: | |
| matrix: | |
| otp: ["25.0", "26.2", "27.2"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.otp }} | |
| elixir-version: "1.18.4" | |
| - name: Download ClickHouse binary | |
| run: | | |
| curl https://clickhouse.com/ | sh | |
| chmod +x ./clickhouse | |
| - name: Start ClickHouse server | |
| run: | | |
| ./clickhouse server > ./clickhouse_server.log 2>&1 & | |
| echo $! > ./clickhouse_server.pid | |
| echo "ClickHouse server started with PID $(cat ./clickhouse_server.pid)" | |
| sleep 5 | |
| - name: Wait for ClickHouse | |
| run: | | |
| echo "Waiting for ClickHouse to start..." | |
| for i in {1..60}; do | |
| if ./clickhouse client --query "SELECT 1" 2>/dev/null; then | |
| echo "ClickHouse is ready!" | |
| ./clickhouse client --query "SELECT version()" | |
| break | |
| fi | |
| if [ $i -eq 60 ]; then | |
| echo "ClickHouse failed to start. Logs:" | |
| cat ./clickhouse_server.log || echo "No log file found" | |
| exit 1 | |
| fi | |
| echo "Still waiting... ($i/60)" | |
| sleep 2 | |
| done | |
| ./clickhouse client --query "SELECT 1" | |
| - name: Install dependencies | |
| run: | | |
| brew install cmake openssl | |
| mix deps.get | |
| - name: Precompile NIFs | |
| run: | | |
| export ELIXIR_MAKE_CACHE_DIR=$(pwd)/cache | |
| mkdir -p $ELIXIR_MAKE_CACHE_DIR | |
| MIX_ENV=prod mix elixir_make.precompile | |
| - name: Upload artifacts to release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: cache/*.tar.gz | |
| draft: true | |
| - name: Run tests on macOS | |
| run: mix test --exclude integration | |
| env: | |
| CLICKHOUSE_HOST: localhost | |
| CLICKHOUSE_PORT: 9000 |