on master help sign in
Fixed builds (?)
a269ef4iko
.github/workflows/github-actions-image.yaml+4−2
@@ -32,8 +32,9 @@ jobs:
32 uses: ./.github/actions/common_setup
32 uses: ./.github/actions/common_setup
33
33
34 - name: Build Linux static binary
34 - name: Build Linux static binary
35+ shell: bash
35 run: |
36 run: |
36− cp $(nix-build -A compaRESTStaticBin -j auto)/bin/comparest compaREST
37+ cp $(nix-build -A compaRESTStaticBin -j auto)/bin/compaREST compaREST
37
38
38 - name: Upload compaREST Linux Binary
39 - name: Upload compaREST Linux Binary
39 uses: actions/upload-artifact@v2
40 uses: actions/upload-artifact@v2
@@ -42,6 +43,7 @@ jobs:
42 path: compaREST
43 path: compaREST
43
44
44 - name: Build Github Action Docker Image
45 - name: Build Github Action Docker Image
46+ shell: bash
45 run: |
47 run: |
46 cp $(nix-build -A compaRESTGithubAction -j auto) compaREST-Github-Action-image.tar.gz
48 cp $(nix-build -A compaRESTGithubAction -j auto) compaREST-Github-Action-image.tar.gz
47 cp $(nix-build -A compaRESTImage-j auto) compaREST-image.tar.gz
49 cp $(nix-build -A compaRESTImage-j auto) compaREST-image.tar.gz
@@ -90,7 +92,7 @@ jobs:
90
92
91 - name: Build macOS binary bundle
93 - name: Build macOS binary bundle
92 run: |
94 run: |
93− cp -LR $(nix-build -A macOSCompaRESTBundle -j auto)/bin/compaREST compaREST
95+ cp -LR $(nix-build -A macOSCompaRESTBundle -j auto) compaREST
94
96
95 - name: Upload macOS compaREST bundle
97 - name: Upload macOS compaREST bundle
96 uses: actions/upload-artifact@v2
98 uses: actions/upload-artifact@v2
compaREST.cabalnew file+218
@@ -0,0 +1,218 @@
1+cabal-version: 2.4
2+name: compaREST
3+version: 0.0.0.0
4+synopsis: Compatibility checker for OpenAPI
5+description: Compatibility checker for OpenAPI.
6+license: MIT
7+license-file: LICENSE
8+author: Typeable
9+maintainer: compaREST@typeable.io
10+copyright: 2021 Typeable
11+category: Web
12+build-type: Simple
13+extra-doc-files: README.md
14+ CHANGELOG.md
15+tested-with: GHC == 8.10.4
16+extra-source-files: awsm-css/dist/awsm.min.css
17+
18+common common-options
19+ ghc-options:
20+ -Weverything
21+ -Wno-implicit-prelude
22+ -Wno-missing-safe-haskell-mode
23+ -Wno-safe
24+ -Wno-prepositive-qualified-module
25+ -Wno-missing-import-lists
26+ -Wno-partial-fields
27+ -Wno-all-missed-specialisations
28+ -Wno-missing-local-signatures
29+ -Wno-unsafe
30+ -fconstraint-solver-iterations=0
31+ default-language: Haskell2010
32+ build-depends: base >= 4.12.0.0 && < 4.16
33+ , text
34+
35+ default-extensions: ApplicativeDo
36+ , BangPatterns
37+ , ConstraintKinds
38+ , DataKinds
39+ , DeriveAnyClass
40+ , DeriveFoldable
41+ , DeriveFunctor
42+ , DeriveGeneric
43+ , DeriveTraversable
44+ , DerivingStrategies
45+ , DerivingVia
46+ , DuplicateRecordFields
47+ , EmptyDataDeriving
48+ , FlexibleContexts
49+ , FlexibleInstances
50+ , FunctionalDependencies
51+ , GADTs
52+ , GeneralizedNewtypeDeriving
53+ , LambdaCase
54+ , MultiParamTypeClasses
55+ , MultiWayIf
56+ , NamedFieldPuns
57+ , NumDecimals
58+ , OverloadedStrings
59+ , PatternSynonyms
60+ , PolyKinds
61+ , QuasiQuotes
62+ , RankNTypes
63+ , RecordWildCards
64+ , ScopedTypeVariables
65+ , StandaloneDeriving
66+ , TemplateHaskell
67+ , TupleSections
68+ , TypeApplications
69+ , TypeFamilies
70+ , TypeOperators
71+ , UndecidableInstances
72+ , ViewPatterns
73+ , QuantifiedConstraints
74+ , DefaultSignatures
75+
76+library
77+ import: common-options
78+ build-depends:
79+ , pcre2
80+ , open-union
81+ , vector
82+ , unordered-containers
83+ , type-fun
84+ , typerep-map
85+ , tagged
86+ , scientific
87+ , pandoc-types
88+ , openapi3
89+ , lattices
90+ , insert-ordered-containers
91+ , http-media
92+ , hashable
93+ , free
94+ , containers
95+ , comonad
96+ , attoparsec
97+ , transformers
98+ , mtl
99+ , aeson
100+ , generic-data
101+ , doctemplates
102+ , file-embed
103+ , data-default
104+ , ordered-containers
105+ , bytestring
106+ hs-source-dirs: src
107+ exposed-modules: Data.OpenApi.Compare.Behavior
108+ , Data.OpenApi.Compare.Common
109+ , Data.OpenApi.Compare.Formula
110+ , Data.OpenApi.Compare.Memo
111+ , Data.OpenApi.Compare.Orphans
112+ , Data.OpenApi.Compare.Paths
113+ , Data.OpenApi.Compare.PathsPrefixTree
114+ , Data.OpenApi.Compare.References
115+ , Data.OpenApi.Compare.Report
116+ , Data.OpenApi.Compare.Report.Html.Template
117+ , Data.OpenApi.Compare.Report.Jet
118+ , Data.OpenApi.Compare.Run
119+ , Data.OpenApi.Compare.Subtree
120+ , Data.OpenApi.Compare.Validate.Header
121+ , Data.OpenApi.Compare.Validate.Link
122+ , Data.OpenApi.Compare.Validate.MediaTypeObject
123+ , Data.OpenApi.Compare.Validate.OAuth2Flows
124+ , Data.OpenApi.Compare.Validate.OpenApi
125+ , Data.OpenApi.Compare.Validate.Operation
126+ , Data.OpenApi.Compare.Validate.Param
127+ , Data.OpenApi.Compare.Validate.PathFragment
128+ , Data.OpenApi.Compare.Validate.Products
129+ , Data.OpenApi.Compare.Validate.RequestBody
130+ , Data.OpenApi.Compare.Validate.Responses
131+ , Data.OpenApi.Compare.Validate.Schema
132+ , Data.OpenApi.Compare.Validate.Schema.DNF
133+ , Data.OpenApi.Compare.Validate.Schema.Issues
134+ , Data.OpenApi.Compare.Validate.Schema.JsonFormula
135+ , Data.OpenApi.Compare.Validate.Schema.Partition
136+ , Data.OpenApi.Compare.Validate.Schema.Process
137+ , Data.OpenApi.Compare.Validate.Schema.Traced
138+ , Data.OpenApi.Compare.Validate.Schema.TypedJson
139+ , Data.OpenApi.Compare.Validate.SecurityRequirement
140+ , Data.OpenApi.Compare.Validate.SecurityScheme
141+ , Data.OpenApi.Compare.Validate.Server
142+ , Data.OpenApi.Compare.Validate.Sums
143+ other-modules: Data.HList
144+ , Data.OpenUnion.Extra
145+
146+executable compaREST
147+ import: common-options
148+ hs-source-dirs: app
149+ main-is: Main.hs
150+ build-depends:
151+ compaREST
152+ , pandoc
153+ , data-default
154+ , bytestring
155+ , yaml
156+ , filepath
157+ , optparse-applicative
158+ , mtl
159+ , aeson
160+ , containers
161+ , doctemplates
162+ , pandoc-types
163+ ghc-options: -threaded
164+ -rtsopts
165+ -with-rtsopts=-N
166+ other-modules:
167+ FormatHeuristic
168+ Data.OpenApi.Compare.Options
169+
170+executable compaREST-GitHub-Action
171+ import: common-options
172+ hs-source-dirs: github-action
173+ main-is: Main.hs
174+ build-depends:
175+ compaREST
176+ , pandoc
177+ , yaml
178+ , aeson
179+ , github
180+ , freer-simple
181+ , vector
182+ , pandoc-types
183+ , envy
184+ , filepath
185+ , bytestring
186+ ghc-options: -threaded
187+ -rtsopts
188+ -with-rtsopts=-N
189+ other-modules:
190+ Control.Monad.Freer.GitHub
191+ CompaREST.GitHub.API
192+ CompaREST.GitHub.Action.Config
193+ GitHub.Data.Checks
194+ GitHub.Endpoints.Checks
195+
196+test-suite compaREST-tests
197+ import: common-options
198+ type: exitcode-stdio-1.0
199+ hs-source-dirs: test
200+ main-is: Spec.hs
201+ other-modules:
202+ Spec.Golden.Extra
203+ Spec.Golden.TraceTree
204+ build-depends:
205+ , compaREST
206+ , tasty-golden
207+ , tasty
208+ , bytestring
209+ , yaml
210+ , directory
211+ , filepath
212+ , pandoc
213+ , data-default
214+ , lens
215+ , pandoc-types
216+ ghc-options: -threaded
217+ -rtsopts
218+ -with-rtsopts=-N
comparest.cabal+8−16
@@ -1,12 +1,12 @@
1cabal-version: 2.4
1cabal-version: 2.4
2−name: comparest
2+name: compaREST
3version: 0.0.0.0
3version: 0.0.0.0
4synopsis: Compatibility checker for OpenAPI
4synopsis: Compatibility checker for OpenAPI
5description: Compatibility checker for OpenAPI.
5description: Compatibility checker for OpenAPI.
6license: MIT
6license: MIT
7license-file: LICENSE
7license-file: LICENSE
8author: Typeable
8author: Typeable
9−maintainer: comparest@typeable.io
9+maintainer: compaREST@typeable.io
10copyright: 2021 Typeable
10copyright: 2021 Typeable
11category: Web
11category: Web
12build-type: Simple
12build-type: Simple
@@ -15,15 +15,7 @@ extra-doc-files: README.md
15tested-with: GHC == 8.10.4
15tested-with: GHC == 8.10.4
16extra-source-files: awsm-css/dist/awsm.min.css
16extra-source-files: awsm-css/dist/awsm.min.css
17
17
18−Flag static
19− Default: False
20− Manual: True
21−
22common common-options
18common common-options
23− if flag(static)
24− cc-options: -static
25− ld-options: -static -pthread
26− ghc-options: -static
27 ghc-options:
19 ghc-options:
28 -Weverything
20 -Weverything
29 -Wno-implicit-prelude
21 -Wno-implicit-prelude
@@ -151,12 +143,12 @@ library
151 other-modules: Data.HList
143 other-modules: Data.HList
152 , Data.OpenUnion.Extra
144 , Data.OpenUnion.Extra
153
145
154−executable comparest
146+executable compaREST
155 import: common-options
147 import: common-options
156 hs-source-dirs: app
148 hs-source-dirs: app
157 main-is: Main.hs
149 main-is: Main.hs
158 build-depends:
150 build-depends:
159− comparest
151+ compaREST
160 , pandoc
152 , pandoc
161 , data-default
153 , data-default
162 , bytestring
154 , bytestring
@@ -175,12 +167,12 @@ executable comparest
175 FormatHeuristic
167 FormatHeuristic
176 Data.OpenApi.Compare.Options
168 Data.OpenApi.Compare.Options
177
169
178−executable comparest-github-action
170+executable compaREST-GitHub-Action
179 import: common-options
171 import: common-options
180 hs-source-dirs: github-action
172 hs-source-dirs: github-action
181 main-is: Main.hs
173 main-is: Main.hs
182 build-depends:
174 build-depends:
183− comparest
175+ compaREST
184 , pandoc
176 , pandoc
185 , yaml
177 , yaml
186 , aeson
178 , aeson
@@ -201,7 +193,7 @@ executable comparest-github-action
201 GitHub.Data.Checks
193 GitHub.Data.Checks
202 GitHub.Endpoints.Checks
194 GitHub.Endpoints.Checks
203
195
204−test-suite comparest-tests
196+test-suite compaREST-tests
205 import: common-options
197 import: common-options
206 type: exitcode-stdio-1.0
198 type: exitcode-stdio-1.0
207 hs-source-dirs: test
199 hs-source-dirs: test
@@ -210,7 +202,7 @@ test-suite comparest-tests
210 Spec.Golden.Extra
202 Spec.Golden.Extra
211 Spec.Golden.TraceTree
203 Spec.Golden.TraceTree
212 build-depends:
204 build-depends:
213− , comparest
205+ , compaREST
214 , tasty-golden
206 , tasty-golden
215 , tasty
207 , tasty
216 , bytestring
208 , bytestring
default.nix+17−17
@@ -14,7 +14,7 @@ let
14 include = [
14 include = [
15 ./stack.yaml
15 ./stack.yaml
16 ./stack.yaml.lock
16 ./stack.yaml.lock
17− ./comparest.cabal
17+ ./compaREST.cabal
18 ];
18 ];
19 };
19 };
20
20
@@ -29,11 +29,11 @@ let
29 "-fspecialise-aggressively"
29 "-fspecialise-aggressively"
30 ];
30 ];
31 packages.pandoc.ghcOptions = [ "-O1" ];
31 packages.pandoc.ghcOptions = [ "-O1" ];
32− packages.comparest.src = nix-filter {
32+ packages.compaREST.src = nix-filter {
33 root = ./.;
33 root = ./.;
34 name = "compaREST-src";
34 name = "compaREST-src";
35 include = with nix-filter; [
35 include = with nix-filter; [
36− (./comparest.cabal)
36+ (./compaREST.cabal)
37 (inDirectory ./test)
37 (inDirectory ./test)
38 (inDirectory ./src)
38 (inDirectory ./src)
39 (inDirectory ./app)
39 (inDirectory ./app)
@@ -53,30 +53,30 @@ let
53 ${pkgs.nukeReferences}/bin/nuke-refs $out/bin/*
53 ${pkgs.nukeReferences}/bin/nuke-refs $out/bin/*
54 '';
54 '';
55
55
56− compaRESTBin = hsPkgs.comparest.components.exes.comparest;
56+ compaRESTBin = hsPkgs.compaREST.components.exes.compaREST;
57− compaRESTStaticBin = (staticify "compaREST-static" hsPkgs.projectCross.musl64.hsPkgs.comparest.components.exes.comparest);
57+ compaRESTStaticBin = (staticify "compaREST-static" hsPkgs.projectCross.musl64.hsPkgs.compaREST.components.exes.compaREST);
58
58
59
59
60 # doesn't work
60 # doesn't work
61− armDarwinCompaREST = hsPkgs.projectCross.aarch64-darwin.hsPkgs.comparest.components.exes.comparest;
61+ armDarwinCompaREST = hsPkgs.projectCross.aarch64-darwin.hsPkgs.compaREST.components.exes.compaREST;
62
62
63 compaRESTImage = pkgs.dockerTools.buildImage {
63 compaRESTImage = pkgs.dockerTools.buildImage {
64 name = "compaREST";
64 name = "compaREST";
65 contents = [ compaRESTStaticBin ];
65 contents = [ compaRESTStaticBin ];
66 config = {
66 config = {
67− Entrypoint = [ "/bin/comparest" ];
67+ Entrypoint = [ "/bin/compaREST" ];
68 };
68 };
69 };
69 };
70
70
71− macOSCompaRESTBundle = pkgs.runCommand "compaREST-macos-bundled"
71+ macOSCompaRESTBundle = pkgs.runCommand "compaREST-macOS-bundled"
72 {
72 {
73 buildInputs = [ masterPkgs.macdylibbundler ];
73 buildInputs = [ masterPkgs.macdylibbundler ];
74 } ''
74 } ''
75 mkdir -p $out/lib
75 mkdir -p $out/lib
76− cp ${compaRESTBin}/bin/comparest $out/comparest
76+ cp ${compaRESTBin}/bin/compaREST $out/compaREST
77− chmod 755 $out/comparest
77+ chmod 755 $out/compaREST
78 dylibbundler -b \
78 dylibbundler -b \
79− -x $out/comparest \
79+ -x $out/compaREST \
80 -d $out/lib \
80 -d $out/lib \
81 -p '@executable_path/lib'
81 -p '@executable_path/lib'
82 '';
82 '';
@@ -84,19 +84,19 @@ let
84
84
85 compaRESTGithubAction =
85 compaRESTGithubAction =
86 let
86 let
87− action = staticify "compaREST-github-action-static" hsPkgs.projectCross.musl64.hsPkgs.comparest.components.exes.comparest-github-action;
87+ action = staticify "compaREST-github-action-static" hsPkgs.projectCross.musl64.hsPkgs.compaREST.components.exes.compaREST-github-action;
88 wrapped = pkgs.runCommand "wrapped-compaREST-github-action" { buildInputs = [ pkgs.makeWrapper ]; } ''
88 wrapped = pkgs.runCommand "wrapped-compaREST-github-action" { buildInputs = [ pkgs.makeWrapper ]; } ''
89− makeWrapper ${action}/bin/comparest-github-action $out/bin/pre --add-flags "pre"
89+ makeWrapper ${action}/bin/compaREST-github-action $out/bin/pre --add-flags "pre"
90− makeWrapper ${action}/bin/comparest-github-action $out/bin/run --add-flags "run"
90+ makeWrapper ${action}/bin/compaREST-github-action $out/bin/run --add-flags "run"
91 '';
91 '';
92 in
92 in
93 pkgs.dockerTools.buildImage {
93 pkgs.dockerTools.buildImage {
94− name = "typeable/comparest-github-action";
94+ name = "typeable/compaREST-GitHub-Action";
95 tag = "latest";
95 tag = "latest";
96 contents = [ wrapped pkgs.cacert ];
96 contents = [ wrapped pkgs.cacert ];
97 };
97 };
98
98
99− WindowsCompaRESTBin = hsPkgs.projectCross.mingwW64.hsPkgs.comparest.components.exes.comparest;
99+ WindowsCompaRESTBin = hsPkgs.projectCross.mingwW64.hsPkgs.compaREST.components.exes.compaREST;
100in
100in
101{
101{
102 inherit compaRESTImage
102 inherit compaRESTImage
@@ -107,5 +107,5 @@ in
107 macOSCompaRESTBundle
107 macOSCompaRESTBundle
108 WindowsCompaRESTBin
108 WindowsCompaRESTBin
109 ;
109 ;
110− test = hsPkgs.comparest.components.tests.comparest-tests;
110+ test = hsPkgs.compaREST.components.tests.compaREST-tests;
111}
111}