-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from tweag/yuriy.taraday/fix-macos-ci
macOS CI fixes
- Loading branch information
Showing
18 changed files
with
114 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-10.15] # TODO: this job does not yet work on more recent macOS (macos-11) | ||
os: | ||
- ubuntu-latest | ||
- macos-11 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -32,7 +34,9 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] # TODO: this job does not yet work on any version of macOS | ||
os: | ||
- ubuntu-latest | ||
- macos-11 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -49,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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"branch": "21.11", | ||
"rev": "506445d88e183bce80e47fc612c710eb592045ed", | ||
"sha256": "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let | ||
# nixpkgs-unstable as of 2021-02-19 | ||
spec = builtins.fromJSON (builtins.readFile ./nixpkgs.json); | ||
nixpkgs = fetchTarball { | ||
url = "https://github.com/${spec.owner}/${spec.repo}/archive/${spec.rev}.tar.gz"; | ||
sha256 = spec.sha256; | ||
}; | ||
in | ||
import nixpkgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
{ pkgs ? import (builtins.fetchTarball { | ||
url = "https://github.com/NixOS/nixpkgs/archive/21.11.tar.gz"; | ||
sha256 = "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02"; | ||
}) { } }: | ||
{ pkgs ? import ./nixpkgs.nix { } }: | ||
|
||
pkgs.mkShell { nativeBuildInputs = [ pkgs.bazel_4 ]; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"branch": "21.11", | ||
"rev": "506445d88e183bce80e47fc612c710eb592045ed", | ||
"sha256": "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let | ||
# nixpkgs-unstable as of 2021-02-19 | ||
spec = builtins.fromJSON (builtins.readFile ./nixpkgs.json); | ||
nixpkgs = fetchTarball { | ||
url = "https://github.com/${spec.owner}/${spec.repo}/archive/${spec.rev}.tar.gz"; | ||
sha256 = spec.sha256; | ||
}; | ||
in | ||
import nixpkgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
{ pkgs ? import (builtins.fetchTarball { | ||
url = "https://github.com/NixOS/nixpkgs/archive/21.11.tar.gz"; | ||
sha256 = "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02"; | ||
}) { } }: | ||
{ pkgs ? import ./nixpkgs.nix { } }: | ||
|
||
pkgs.mkShell { nativeBuildInputs = [ pkgs.bazel_4 ]; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"branch": "21.11", | ||
"rev": "506445d88e183bce80e47fc612c710eb592045ed", | ||
"sha256": "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let | ||
# nixpkgs-unstable as of 2021-02-19 | ||
spec = builtins.fromJSON (builtins.readFile ./nixpkgs.json); | ||
nixpkgs = fetchTarball { | ||
url = "https://github.com/${spec.owner}/${spec.repo}/archive/${spec.rev}.tar.gz"; | ||
sha256 = spec.sha256; | ||
}; | ||
in | ||
import nixpkgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
{ pkgs ? import (builtins.fetchTarball { | ||
url = "https://github.com/NixOS/nixpkgs/archive/21.11.tar.gz"; | ||
sha256 = "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02"; | ||
}) { } }: | ||
{ pkgs ? import ./nixpkgs.nix { } }: | ||
|
||
pkgs.mkShell { nativeBuildInputs = [ pkgs.bazel_4 ]; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"branch": "21.11", | ||
"rev": "506445d88e183bce80e47fc612c710eb592045ed", | ||
"sha256": "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let | ||
# nixpkgs-unstable as of 2021-02-19 | ||
spec = builtins.fromJSON (builtins.readFile ./nixpkgs.json); | ||
nixpkgs = fetchTarball { | ||
url = "https://github.com/${spec.owner}/${spec.repo}/archive/${spec.rev}.tar.gz"; | ||
sha256 = spec.sha256; | ||
}; | ||
in | ||
import nixpkgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
{ pkgs ? import (builtins.fetchTarball { | ||
url = "https://github.com/NixOS/nixpkgs/archive/21.11.tar.gz"; | ||
sha256 = "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02"; | ||
}) { } }: | ||
{ pkgs ? import ./nixpkgs.nix { } }: | ||
|
||
pkgs.mkShell { nativeBuildInputs = [ pkgs.bazel_4 ]; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"branch": "21.11", | ||
"rev": "506445d88e183bce80e47fc612c710eb592045ed", | ||
"sha256": "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let | ||
# nixpkgs-unstable as of 2021-02-19 | ||
spec = builtins.fromJSON (builtins.readFile ./nixpkgs.json); | ||
nixpkgs = fetchTarball { | ||
url = "https://github.com/${spec.owner}/${spec.repo}/archive/${spec.rev}.tar.gz"; | ||
sha256 = spec.sha256; | ||
}; | ||
in | ||
import nixpkgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
{ pkgs ? import (builtins.fetchTarball { | ||
url = "https://github.com/NixOS/nixpkgs/archive/21.11.tar.gz"; | ||
sha256 = "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02"; | ||
}) { } }: | ||
{ pkgs ? import ./nixpkgs.nix { } }: | ||
|
||
pkgs.mkShell { nativeBuildInputs = [ pkgs.bazel_4 ]; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters