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 #186 and Rust one because of #187,
so skip them for now.

Fixes #176
  • Loading branch information
YorikSar committed Feb 21, 2022
1 parent d3ecfd7 commit 5110ff1
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/checkout@v2.4.0
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 5110ff1

Please sign in to comment.