Skip to content

Commit

Permalink
Add macos-11 runner to examples job
Browse files Browse the repository at this point in the history
All examples are already using 21.11 nixpkgs, so that shouldn't prevent
them from working on Big Sur.

Python example is broken because of tweag#186 and Rust one because of tweag#187,
so skip them for now.

Fixes tweag#176
  • Loading branch information
YorikSar authored and ryanbujnowicz committed Mar 5, 2022
1 parent ab67caa commit a030969
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-latest # TODO: this job does not yet work on any version of macOS
- ubuntu-latest
- macos-11
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
Expand All @@ -52,16 +53,33 @@ jobs:
EOF
- name: Build & test
run: |
skip() {
echo "Will skip $(head -n1 $2/README.md) ${1%_nix} Nix"
local p="$1[@]"
read -a ${1} <<< $(echo ${!p//$2})
}
cd examples/toolchains
for dir in *; do
with_nix=( $(ls) )
without_nix=( cc go rust )
if [ "${{ runner.os }}" == "macOS" ]; then
# Python - https://github.com/tweag/rules_nixpkgs/issues/186
skip with_nix python
# Rust - https://github.com/tweag/rules_nixpkgs/issues/187
skip with_nix rust
skip without_nix rust
fi
for dir in "${with_nix[@]}"; do
cd "$dir"
echo
echo Running $(head -n1 README.md) with Nix
nix-shell --command 'bazel run --config=nix :hello'
# TODO: all toolchains should run without Nixpkgs
cd ..
done
for dir in cc go rust; do
for dir in "${without_nix[@]}"; do
cd "$dir"
echo
echo Running $(head -n1 README.md) without Nix
Expand Down

0 comments on commit a030969

Please sign in to comment.