Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release download and windows compilation workflow tests #102

Merged
merged 61 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
2cadb01
Update ubuntu and actions checkout versions
nicodr97 Jul 9, 2024
b84b935
Add file to force workflow run
nicodr97 Jul 9, 2024
e0647f3
Add first Windows build and test
nicodr97 Jul 9, 2024
c068757
Edit file to force workflow run
nicodr97 Jul 9, 2024
1bd5b92
Debug Windows workflow error
nicodr97 Jul 10, 2024
155fb30
Edit file to force workflow run
nicodr97 Jul 10, 2024
eb611f8
Debug Windows binaries dependencies
nicodr97 Jul 10, 2024
2e443cc
Edit file to force workflow run
nicodr97 Jul 10, 2024
0e1ee46
Run workflow only on new Windows binaries
nicodr97 Jul 10, 2024
742fd66
Edit file to force workflow run
nicodr97 Jul 10, 2024
47bd36c
List directory
nicodr97 Jul 10, 2024
8bdb6cb
Edit file to force workflow run
nicodr97 Jul 10, 2024
4dd8840
Fix binaries path
nicodr97 Jul 10, 2024
53f8563
Edit file to force workflow run
nicodr97 Jul 10, 2024
d43cc13
Remove non-existent parameter
nicodr97 Jul 10, 2024
0731e9c
Edit file to force workflow run
nicodr97 Jul 10, 2024
e80720a
Add generate_trimmed_msas Power Shell script
nicodr97 Jul 10, 2024
ea4de97
Add compare_trimmed_msas Power Shell script
nicodr97 Jul 10, 2024
4ecc663
Run Windows binaries tests
nicodr97 Jul 10, 2024
e710557
Edit file to force workflow run
nicodr97 Jul 10, 2024
f700c47
Debug trimmed msa comparisons
nicodr97 Jul 10, 2024
a65257f
Fix test file paths
nicodr97 Jul 10, 2024
3ae8c9a
Simplify tests
nicodr97 Jul 10, 2024
940b119
Consider empty files
nicodr97 Jul 10, 2024
81b95b7
Recover old tests
nicodr97 Jul 10, 2024
35047b2
Add Windows compilation tests
nicodr97 Aug 9, 2024
21144ef
Edit file to force workflow run
nicodr97 Aug 9, 2024
801b829
Change script lines to execute them
nicodr97 Aug 9, 2024
e11f24d
Edit file to force workflow run
nicodr97 Aug 9, 2024
0350dcd
Debug Windows tests
nicodr97 Aug 9, 2024
cb79b3f
Edit file to force workflow run
nicodr97 Aug 9, 2024
40416ba
Debug Windows tests
nicodr97 Aug 9, 2024
2270a2a
Edit file to force workflow run
nicodr97 Aug 9, 2024
cabf5fc
Add Windows script for testing
nicodr97 Aug 9, 2024
f493510
Update test script to be run
nicodr97 Aug 9, 2024
5d77124
Edit file to force workflow run
nicodr97 Aug 9, 2024
973d154
Debug Windows compilation test
nicodr97 Aug 12, 2024
c4224b4
Edit file to force workflow run
nicodr97 Aug 12, 2024
28439a4
Update build.yml
nicodr97 Aug 12, 2024
46000c5
Edit file to force workflow run
nicodr97 Aug 12, 2024
1347d91
Update build.yml
nicodr97 Aug 12, 2024
9c70f18
Edit file to force workflow run
nicodr97 Aug 12, 2024
fe8b5b6
Delete scripts/generate_trimmed_msas_Windows.sh
nicodr97 Aug 12, 2024
00d0a4b
Update build.yml
nicodr97 Aug 12, 2024
2839828
Edit file to force workflow run
nicodr97 Aug 12, 2024
c30236f
Add generate_trimmed_msas_Windows.sh
nicodr97 Aug 12, 2024
e99735b
Edit file to force workflow run
nicodr97 Aug 12, 2024
c0c8416
Fix executable path
nicodr97 Aug 12, 2024
6e044c3
Delete scripts/generate_trimmed_msas_Windows.sh
nicodr97 Aug 12, 2024
9b420c6
Add download release tests
nicodr97 Aug 12, 2024
f5388e9
Edit file to force workflow run
nicodr97 Aug 12, 2024
e613fa8
Add Linux tests
nicodr97 Aug 12, 2024
c4e9005
Edit file to force workflow run
nicodr97 Aug 12, 2024
13954c5
Update build.yml
nicodr97 Aug 12, 2024
bd2e5d3
Edit file to force workflow run
nicodr97 Aug 12, 2024
bf2e001
Fix folder name
nicodr97 Aug 12, 2024
702b924
Edit file to force workflow run
nicodr97 Aug 12, 2024
a4e2704
Ignore arch64 download release
nicodr97 Aug 12, 2024
e7ca094
Edit file to force workflow run
nicodr97 Aug 12, 2024
8b1ca55
Update .gitignore
nicodr97 Sep 25, 2024
ba26682
Delete scripts/dummy-file.txt
nicodr97 Sep 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 67 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,26 @@ on:
name: Build

jobs:
build_and_test:
download_and_test_ubuntu:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Download Release Binaries
run: |
curl -L -o trimal.zip https://github.com/inab/trimal/releases/download/v1.5.0/trimAl_Linux_x86-64.zip &&
unzip trimal.zip && mv trimAl_Linux_x86-64/* source/
- name: Test trimal for Linux x86_64
run: file source/trimal && file source/readal && file source/statal && ./scripts/generate_trimmed_msas.sh &&
./scripts/compare_trimmed_msas.sh

build_and_test_ubuntu:
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [x86_64, aarch64]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build trimal for Linux x86_64
if: matrix.arch == 'x86_64'
run: cd source && make all && file trimal && file readal && file statal &&
Expand All @@ -41,3 +53,56 @@ jobs:
run: |
cd /trimal/source && make all && file trimal && file readal && file statal &&
cd .. && ./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh

download_and_test_windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Download Release Binaries
run: |
curl -L -o trimal.zip https://github.com/inab/trimal/releases/download/v1.5.0/trimAl_Windows_x86-64.zip

- name: Unzip Binaries
run: |
powershell -Command "Expand-Archive -Path trimal.zip -DestinationPath ."

- name: Verify Binaries
run: |
Move-Item -Path .\trimal.exe -Destination .\source\
Get-Command .\source\trimal.exe

- name: Run generate_trimmed_msas.ps1
run: |
powershell -ExecutionPolicy Bypass -File .\scripts\generate_trimmed_msas.ps1

- name: Run compare_trimmed_msas.ps1
run: |
powershell -ExecutionPolicy Bypass -File .\scripts\compare_trimmed_msas.ps1

build_and_test_windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
make
mingw-w64-x86_64-gcc
file
- name: Build trimal for Windows x86_64
run: |
cd source
make -f makefile.Windows
file trimal.exe
file readal.exe
file statal.exe
- name: Run generate_trimmed_msas.ps1
run: |
powershell -ExecutionPolicy Bypass -File .\scripts\generate_trimmed_msas.ps1

- name: Run compare_trimmed_msas.ps1
run: |
powershell -ExecutionPolicy Bypass -File .\scripts\compare_trimmed_msas.ps1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
source/readal
source/statal
source/trimal
docs/build
docs/build
scripts/dummy-file.txt
44 changes: 44 additions & 0 deletions scripts/compare_trimmed_msas.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Define methods
$methods = "gappyout", "strict", "strictplus", "automated1", "nogaps", "noallgaps"

# Compare files
foreach ($method in $methods) {
$files = Get-ChildItem -Path "test_msas\$method" -Filter *.fasta
foreach ($file in $files) {
$msa_filename = $file.Name
$test_file = $file.FullName
$reference_file = Join-Path -Path "dataset\trimmed_msas\$method" -ChildPath $msa_filename

if (-Not (Test-Path $reference_file)) {
Write-Output "Reference file $reference_file does not exist."
exit 1
}

if (-Not (Test-Path $test_file)) {
Write-Output "Test file $test_file does not exist."
exit 1
}

$test_content = Get-Content $test_file
$reference_content = Get-Content $reference_file

# Check if both files are empty
if ($test_content.Count -eq 0 -and $reference_content.Count -eq 0) {
Write-Output "Both $test_file and $reference_file are empty and considered equal."
continue
}

# Compare contents
$result = Compare-Object $test_content $reference_content -SyncWindow 0
if ($result) {
Write-Output "Files $test_file and $reference_file differ."
exit 1
}
else {
Write-Output "Compared $test_file and $reference_file"
}
}
}

# Remove test_msas directory
Remove-Item -Recurse -Force test_msas
Loading
Loading