|
| 1 | +on: [ push, pull_request ] |
| 2 | +name: Build |
| 3 | +jobs: |
| 4 | + build: |
| 5 | + strategy: |
| 6 | + matrix: |
| 7 | + os: [ ubuntu-latest, macos-latest ] |
| 8 | + features: |
| 9 | + - macos-validation-data,remote-clearadi |
| 10 | + - macos-validation-data,remote-anisette-v3 |
| 11 | + fail-fast: false |
| 12 | + name: ${{ matrix.os }} with ${{ matrix.features }} |
| 13 | + runs-on: ${{ matrix.os }} |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + submodules: true |
| 18 | + |
| 19 | + - name: Install Protobuf compiler |
| 20 | + run: | |
| 21 | + if [[ "$OSTYPE" == "linux-gnu"* ]]; then |
| 22 | + sudo apt-get install -y protobuf-compiler |
| 23 | + elif [[ "$OSTYPE" == "darwin"* ]]; then |
| 24 | + brew install protobuf |
| 25 | + fi |
| 26 | +
|
| 27 | + - name: Set up fake Fairplay keys |
| 28 | + run: | |
| 29 | + mkdir -p certs/fairplay |
| 30 | +
|
| 31 | + cert_names=( |
| 32 | + "4056631661436364584235346952193" |
| 33 | + "4056631661436364584235346952194" |
| 34 | + "4056631661436364584235346952195" |
| 35 | + "4056631661436364584235346952196" |
| 36 | + "4056631661436364584235346952197" |
| 37 | + "4056631661436364584235346952198" |
| 38 | + "4056631661436364584235346952199" |
| 39 | + "4056631661436364584235346952200" |
| 40 | + "4056631661436364584235346952201" |
| 41 | + "4056631661436364584235346952208" |
| 42 | + ) |
| 43 | +
|
| 44 | + for name in "${cert_names[@]}"; do |
| 45 | + touch certs/fairplay/$name.pem |
| 46 | + touch certs/fairplay/$name.crt |
| 47 | + done |
| 48 | +
|
| 49 | + - uses: actions-rs/toolchain@v1 |
| 50 | + with: |
| 51 | + toolchain: stable |
| 52 | + - uses: actions-rs/cargo@v1 |
| 53 | + with: |
| 54 | + command: build |
| 55 | + args: --release --features '${{ matrix.features }}' --package rustpush --lib |
0 commit comments