Browse Source

Merge pull request #625 from ThisDrunkDane/nightly-build

Improve nightly builds
Mikkel Hjortshøj 5 years ago
parent
commit
1e711fa5a5
2 changed files with 6 additions and 0 deletions
  1. 4 0
      .github/workflows/nightly.yml
  2. 2 0
      ci/create_nightly_json.py

+ 4 - 0
.github/workflows/nightly.yml

@@ -3,6 +3,7 @@ name:  Nightly
 on:
 on:
   schedule:
   schedule:
     - cron: 0 20 * * *
     - cron: 0 20 * * *
+  push:
 
 
 jobs:
 jobs:
   build_windows:
   build_windows:
@@ -17,6 +18,7 @@ jobs:
           cd bin
           cd bin
           curl -sL https://github.com/odin-lang/Odin/releases/download/llvm-windows/llvm-binaries.zip --output llvm-binaries.zip
           curl -sL https://github.com/odin-lang/Odin/releases/download/llvm-windows/llvm-binaries.zip --output llvm-binaries.zip
           7z x llvm-binaries.zip > nul
           7z x llvm-binaries.zip > nul
+          rm -f llvm-binaries.zip
       - name: build Odin
       - name: build Odin
         shell: cmd
         shell: cmd
         run: |
         run: |
@@ -29,8 +31,10 @@ jobs:
           odin run examples/demo/demo.odin
           odin run examples/demo/demo.odin
       - name: Copy artifacts
       - name: Copy artifacts
         run: |
         run: |
+          rm bin/llvm/windows/LLVM-C.lib
           mkdir dist
           mkdir dist
           cp odin.exe dist
           cp odin.exe dist
+          cp LLVM-C.dll dist
           cp -r shared dist
           cp -r shared dist
           cp -r core dist
           cp -r core dist
           cp -r bin dist
           cp -r bin dist

+ 2 - 0
ci/create_nightly_json.py

@@ -18,6 +18,7 @@ def main():
             name = remove_prefix(data['fileName'], "nightly/")
             name = remove_prefix(data['fileName'], "nightly/")
             url = f"https://f001.backblazeb2.com/file/{bucket}/nightly/{urllib.parse.quote_plus(name)}"
             url = f"https://f001.backblazeb2.com/file/{bucket}/nightly/{urllib.parse.quote_plus(name)}"
             sha1 = data['contentSha1']
             sha1 = data['contentSha1']
+            size = int(data['contentLength'])
             ts = int(data['fileInfo']['src_last_modified_millis'])
             ts = int(data['fileInfo']['src_last_modified_millis'])
             date = datetime.datetime.fromtimestamp(ts/1000).strftime('%Y-%m-%d')
             date = datetime.datetime.fromtimestamp(ts/1000).strftime('%Y-%m-%d')
             
             
@@ -28,6 +29,7 @@ def main():
                                             'name': name,
                                             'name': name,
                                             'url': url,
                                             'url': url,
                                             'sha1': sha1,
                                             'sha1': sha1,
+                                            'sizeInBytes': size,
                                          })
                                          })
 
 
     now = datetime.datetime.utcnow().isoformat()
     now = datetime.datetime.utcnow().isoformat()