Skip to content

CI

CI #1

Workflow file for this run

name: CI
on:
# push:
# tags:
# - '*'
workflow_dispatch:
jobs:
build_bin:
strategy:
max-parallel: 1
fail-fast: true
matrix:
settings:
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
build: make release-linux
- host: macos-latest
target: aarch64-apple-darwin
build: make release-mac-aarch64
- host: macos-12
target: x86_64-apple-darwin
build: make release-mac-x86_64
# - host: macos-latest # This needs aarch64 OpenSSL, will wait github action support MacOS M1(https://github.com/github/roadmap/issues/528), then run this.
# target: aarch64-apple-darwin
# build: make release-mac-aarch64
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.settings.target }}
profile: minimal
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
client/target/
key: ${{ matrix.settings.host }}-${{ matrix.settings.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ matrix.settings.host }}-cargo-${{ matrix.settings.target }}
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Build
run: ${{ matrix.settings.build }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: mproxy-${{ matrix.settings.target }}
path: release/*
if-no-files-found: error