Skip to content

Commit

Permalink
refine github actions (#56)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #56

Test Plan: https://github.com/facebook/ocamlrep/actions/runs/7561679747/job/20590486601?pr=56

Reviewed By: dtolnay

Differential Revision: D52847904

Pulled By: shayne-fletcher

fbshipit-source-id: 3b0cb6e124a9583dd8291b361026531be0392029
  • Loading branch information
Shayne Fletcher authored and facebook-github-bot committed Jan 18, 2024
1 parent b1bbf80 commit bc752d9
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/cargo-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,25 @@ name: Cargo build and test
on:
push:
pull_request:
workflow_dispatch:
jobs:
linux-cargo-build-and-test:
runs-on: ubuntu-latest
cargo-build-and-test:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update && sudo apt-get install libssl-dev cmake clang lld opam zstd
- run: opam init --compiler=5.1.1 --disable-sandboxing -y
- run: eval $(opam env) && ./ocaml-setup.sh
- run: sudo apt-get update && sudo apt-get install opam
if: matrix.os == 'ubuntu'
- run: brew install opam
if: matrix.os == 'macos'
- run: |
opam init --compiler=5.1.1 --disable-sandboxing -y
opam env | sed "s/export .*//g" | sed "s/'//g" | sed "s/\;//g" >> $GITHUB_ENV
- run: ./ocaml-setup.sh
- run: cargo build
- run: cargo test

0 comments on commit bc752d9

Please sign in to comment.