mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
add test for releases
This commit is contained in:
parent
29a9a8f479
commit
d422174274
2 changed files with 45 additions and 7 deletions
2
.github/workflows/ci_manager.yml
vendored
2
.github/workflows/ci_manager.yml
vendored
|
|
@ -1,5 +1,5 @@
|
|||
on:
|
||||
pull_request:
|
||||
# pull_request:
|
||||
|
||||
# cancel current runs when a new commit is pushed
|
||||
concurrency:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
on:
|
||||
# pull_request:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 9 * * *"
|
||||
|
|
@ -77,20 +77,58 @@ jobs:
|
|||
SHA: ${{ env.SHA }}
|
||||
run: echo "RELEASE_FOLDER_NAME=new_roc_nightly-${{ matrix.artifact_name }}-$DATE-$SHA" >> $GITHUB_ENV
|
||||
|
||||
- name: Package release (Unix)
|
||||
- name: Package release
|
||||
run: |
|
||||
mkdir -p ${{ env.RELEASE_FOLDER_NAME }}
|
||||
cp ./zig-out/bin/roc ${{ env.RELEASE_FOLDER_NAME }}/
|
||||
cp LICENSE legal_details ${{ env.RELEASE_FOLDER_NAME }}/
|
||||
tar -czvf "${{ env.RELEASE_FOLDER_NAME }}.tar.gz" ${{ env.RELEASE_FOLDER_NAME }}
|
||||
|
||||
- name: Calculate archive hash for security purposes
|
||||
shell: bash
|
||||
- name: Compress release (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: tar -czvf "${{ env.RELEASE_FOLDER_NAME }}.tar.gz" ${{ env.RELEASE_FOLDER_NAME }}
|
||||
|
||||
- name: Compress release (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: 7z a -tzip "${{ env.RELEASE_FOLDER_NAME }}.zip" ${{ env.RELEASE_FOLDER_NAME }}
|
||||
|
||||
- name: Calculate archive hash for security purposes (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: sha256sum ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
|
||||
|
||||
- name: Upload roc nightly tar
|
||||
- name: Calculate archive hash for security purposes (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: sha256sum ${{ env.RELEASE_FOLDER_NAME }}.zip
|
||||
|
||||
- name: Upload roc nightly archive (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
|
||||
path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
|
||||
retention-days: 4
|
||||
|
||||
- name: Upload roc nightly archive (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.RELEASE_FOLDER_NAME }}.zip
|
||||
path: ${{ env.RELEASE_FOLDER_NAME }}.zip
|
||||
retention-days: 4
|
||||
|
||||
- name: Clean workspace for test
|
||||
run: |
|
||||
find . -mindepth 1 -maxdepth 1 ! -name "${{ env.RELEASE_FOLDER_NAME }}.tar.gz" ! -name "${{ env.RELEASE_FOLDER_NAME }}.zip" ! -name "src" -exec rm -rf {} +
|
||||
find src -mindepth 1 ! -path "src/PROFILING*" -exec rm -rf {} +
|
||||
find src/PROFILING -mindepth 1 ! -name "bench_repeated_check.roc" -exec rm -rf {} +
|
||||
|
||||
- name: Test archive (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
tar -xzf "${{ env.RELEASE_FOLDER_NAME }}.tar.gz"
|
||||
./${{ env.RELEASE_FOLDER_NAME }}/roc check src/PROFILING/bench_repeated_check.roc
|
||||
|
||||
- name: Test archive (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
7z x "${{ env.RELEASE_FOLDER_NAME }}.zip"
|
||||
./${{ env.RELEASE_FOLDER_NAME }}/roc check src/PROFILING/bench_repeated_check.roc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue