Skip to content

Commit 4d54ea7

Browse files
committed
Update tests.yml
1 parent 575b289 commit 4d54ea7

File tree

1 file changed

+37
-36
lines changed

1 file changed

+37
-36
lines changed

.github/workflows/tests.yml

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,44 @@ jobs:
1313
runs-on: windows-latest
1414

1515
steps:
16-
- name: Checkout repository
17-
uses: actions/[email protected]
16+
- name: Fetch Simba 2 download URL
17+
id: simba-url
18+
run: |
19+
$url = "https://raw.githubusercontent.com/Villavu/Simba-Build-Archive/refs/heads/main/latest.win64"
20+
$response = Invoke-WebRequest -Uri $url -UseBasicParsing
21+
$baseUrl = $response.Content.Trim() -replace 'Win64\.zip\?raw=true$', ''
22+
Write-Output "Base URL: $baseUrl"
23+
echo "::set-output name=baseUrl::$baseUrl"
24+
New-Item -Path ".\Includes" -ItemType Directory
1825
19-
- name: Fetch Simba 2 download URL
20-
id: simba-url
21-
shell: bash
22-
run: |
23-
url="https://raw.githubusercontent.com/Villavu/Simba-Build-Archive/refs/heads/main/latest.win64"
24-
baseUrl=$(curl -s "$url" | sed 's/Win64\.zip?raw=true$//')
25-
echo "Base URL: $baseUrl"
26-
echo "::set-output name=baseUrl::$baseUrl"
26+
- name: Download Simba 2.0 (64-bit)
27+
run: |
28+
$baseUrl = "${{ steps.simba-url.outputs.baseUrl }}"
29+
$downloadUrl = "$baseUrl" + "Win64.zip?raw=true"
30+
Write-Output "Download URL (64-bit): $downloadUrl"
31+
$outputFile = ".\download.zip"
32+
Invoke-WebRequest -Uri $downloadUrl -OutFile $outputFile
33+
Expand-Archive -Path $outputFile -DestinationPath . -Force
34+
Remove-Item -Path $outputFile -Force
2735
28-
- name: Download Simba 2.0 (64-bit)
29-
shell: bash
30-
run: |
31-
baseUrl="${{ steps.simba-url.outputs.baseUrl }}"
32-
downloadUrl="${baseUrl}Win64.zip?raw=true"
33-
echo "Download URL (64-bit): $downloadUrl"
34-
curl "$downloadUrl"
35-
pwd
36-
ls
37-
unzip -o ./Win64.zip -d ./tests
38-
rm -f ./Win64.zip
36+
- name: Download Simba 2.0 (32-bit)
37+
run: |
38+
$baseUrl = "${{ steps.simba-url.outputs.baseUrl }}"
39+
$downloadUrl = "$baseUrl" + "Win32.zip?raw=true"
40+
Write-Output "Download URL (32-bit): $downloadUrl"
41+
$outputFile = ".\download.zip"
42+
Invoke-WebRequest -Uri $downloadUrl -OutFile $outputFile
43+
Expand-Archive -Path $outputFile -DestinationPath . -Force
44+
Remove-Item -Path $outputFile -Force
3945
40-
- name: Download Simba 2.0 (32-bit)
41-
shell: bash
42-
run: |
43-
baseUrl="${{ steps.simba-url.outputs.baseUrl }}"
44-
downloadUrl="${baseUrl}Win32.zip?raw=true"
45-
echo "Download URL (32-bit): $downloadUrl"
46-
curl "$downloadUrl"
47-
pwd
48-
ls
49-
unzip -o ./Win32.zip -d ./tests
50-
rm -f ./Win32.zip
46+
- name: Checkout repository
47+
uses: actions/[email protected]
48+
with:
49+
path: ./Includes/SRLT
5150

52-
- name: Run tests
53-
run: |
54-
cd ./tests
55-
ls
51+
- name: Run tests
52+
working-directory: ./tests
53+
run: |
54+
Get-ChildItem -Recurse
55+
./Simba-Win32.exe --run ./Includes/SRLT/tests/compile.simba
56+
./Simba-Win64.exe --run ./Includes/SRLT/tests/compile.simba

0 commit comments

Comments
 (0)