forked from direnv/direnv
-
Notifications
You must be signed in to change notification settings - Fork 0
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 direnv#484 from direnv/azure-pipelines
Set up CI with Azure Pipelines
- Loading branch information
Showing
13 changed files
with
129 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,29 @@ | ||
# See https://aka.ms/yaml | ||
|
||
trigger: | ||
- master | ||
|
||
jobs: | ||
- job: Linux | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
steps: | ||
- template: ci/build-steps.yml | ||
|
||
- job: macOS | ||
pool: | ||
vmImage: 'macOS-10.13' | ||
steps: | ||
- template: ci/build-steps.yml | ||
|
||
- job: Release | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
steps: | ||
- template: ci/release-steps.yml | ||
|
||
# - job: Windows | ||
# pool: | ||
# vmImage: 'windows-2019' | ||
# steps: | ||
# - template: azure-pipelines-windows.yml |
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,19 @@ | ||
steps: | ||
- checkout: self | ||
fetchDepth: 1 | ||
- bash: | | ||
set -euo pipefail | ||
curl -sfL https://nixos.org/nix/install | bash | ||
displayName: 'Install Nix' | ||
- bash: | | ||
set -euo pipefail | ||
MANPATH= | ||
source $HOME/.nix-profile/etc/profile.d/nix.sh | ||
nix-build | ||
displayName: 'Build' | ||
- bash: | | ||
set -euo pipefail | ||
MANPATH= | ||
source $HOME/.nix-profile/etc/profile.d/nix.sh | ||
nix-shell --pure --run "make test" | ||
displayName: 'Test' |
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,22 @@ | ||
steps: | ||
- checkout: self | ||
fetchDepth: 1 | ||
- bash: | | ||
set -euo pipefail | ||
curl -sfL https://nixos.org/nix/install | bash | ||
displayName: 'Install Nix' | ||
- bash: | | ||
set -euo pipefail | ||
MANPATH= | ||
source $HOME/.nix-profile/etc/profile.d/nix.sh | ||
nix-shell --pure --run "make dist DISTDIR=$BUILD_ARTIFACTSTAGINGDIRECTORY" | ||
displayName: 'Build static binaries' | ||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish static binaries' | ||
inputs: | ||
artifactName: direnv-bins | ||
- task: GithubRelease@0 | ||
displayName: 'Create GitHub Release' | ||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v') | ||
inputs: | ||
githubConnection: direnv-releases |
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,5 @@ | ||
{ sources ? import ./sources.nix }: | ||
import sources.nixpkgs { | ||
config = {}; | ||
overlays = []; | ||
} |
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,12 @@ | ||
{ | ||
"nixpkgs": { | ||
"url": "https://github.com/nixos/nixpkgs-channels/archive/3a4ffdd38b56801ce616aa08791121d36769e884.tar.gz", | ||
"owner": "nixos", | ||
"branch": "nixos-19.03", | ||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz", | ||
"repo": "nixpkgs-channels", | ||
"sha256": "1vfmmd88x4rmgrz95xzr67xpmp1cqbrk6cfdadxv8ifqk0gsbrm7", | ||
"description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels", | ||
"rev": "3a4ffdd38b56801ce616aa08791121d36769e884" | ||
} | ||
} |
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,29 @@ | ||
# A record, from name to path, of the third-party packages | ||
with | ||
{ | ||
sources = builtins.fromJSON (builtins.readFile ./sources.json); | ||
|
||
# fetchTarball version that is compatible between all the sources of Nix | ||
fetchTarball = | ||
{ url, sha256 }: | ||
if builtins.lessThan builtins.nixVersion "1.12" then | ||
builtins.fetchTarball { inherit url; } | ||
else | ||
builtins.fetchTarball { inherit url sha256; }; | ||
mapAttrs = builtins.mapAttrs or | ||
(f: set: with builtins; | ||
listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set))); | ||
}; | ||
|
||
# NOTE: spec must _not_ have an "outPath" attribute | ||
mapAttrs (_: spec: | ||
if builtins.hasAttr "outPath" spec | ||
then abort | ||
"The values in sources.json should not have an 'outPath' attribute" | ||
else | ||
if builtins.hasAttr "url" spec && builtins.hasAttr "sha256" spec | ||
then | ||
spec // | ||
{ outPath = fetchTarball { inherit (spec) url sha256; } ; } | ||
else spec | ||
) sources |
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,4 +1,4 @@ | ||
{ pkgs ? import <nixpkgs> {} }: | ||
{ pkgs ? import ./nix {} }: | ||
with pkgs; | ||
mkShell { | ||
buildInputs = [ | ||
|
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