Skip to content

Commit

Permalink
Merge pull request #86 from sergot/update-build-process
Browse files Browse the repository at this point in the history
Delete precomp files when rebuilding
  • Loading branch information
ugexe authored Jun 22, 2021
2 parents 06ffd7c + b59d6c6 commit 53235c4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
13 changes: 12 additions & 1 deletion Build.pm6
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
use PathTools;
use JSON::Fast;

unit class Build;

method build($cwd --> Bool) {
Expand All @@ -20,7 +23,15 @@ method build($cwd --> Bool) {
;
}

my $json = Rakudo::Internals::JSON.to-json: %libraries, :pretty, :sorted-keys;
my $json = to-json(%libraries, :pretty, :sorted-keys);
"resources/libraries.json".IO.spurt: $json;

# DO NOT COPY THIS SOLUTION
# Delete precomp files when building in case the openssl libs have since been updated
# (ideally this type of stale precomp would get picked up by raku)
# see: https://github.com/sergot/openssl/issues/82#issuecomment-864523511
try rm($cwd.IO.child('.precomp').absolute, :r, :f, :d);
try rm($cwd.IO.child('lib/.precomp').absolute, :r, :f, :d);

return True;
}
1 change: 1 addition & 0 deletions META6.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version" : "0.1.24",
"author" : "github:sergot",
"description" : "OpenSSL bindings",
"build-depends" : ["PathTools","JSON::Fast"],
"depends" : [],
"provides" : {
"OpenSSL" : "lib/OpenSSL.pm6",
Expand Down
6 changes: 4 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ install:
- SET PATH=%APPVEYOR_BUILD_FOLDER%\..\rakudo\install\bin;%PATH%
- SET PATH=%APPVEYOR_BUILD_FOLDER%\..\rakudo\install\share\perl6\site\bin;%PATH%
- cd %APPVEYOR_BUILD_FOLDER%
- git clone https://github.com/ugexe/zef %APPVEYOR_BUILD_FOLDER%\..\zef
- raku -I %APPVEYOR_BUILD_FOLDER%\..\zef %APPVEYOR_BUILD_FOLDER%\..\zef\bin\zef --deps-only install .
- raku -I %APPVEYOR_BUILD_FOLDER%\..\zef %APPVEYOR_BUILD_FOLDER%\..\zef\bin\zef build .

build: off

test_script:
- SET NETWORK_TESTING=1
- perl6 -I. -e "require(q[Build.pm6]); ::(q[Build]).new.build(q[.])"
- prove -v -e "perl6 -I." t/
- prove -v -e "raku -I." t/

shallow_clone: true

0 comments on commit 53235c4

Please sign in to comment.