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

update to generate mac arm binary #247

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
71 changes: 59 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
path: vcf_assembly_checker_linux


### Mac OS build
macos_build:
### Mac OS build intel
macos_build_intel:
runs-on: macos-12
strategy:
matrix:
Expand All @@ -84,33 +84,80 @@ jobs:
- name: Rename release files
if: ${{ matrix.config.cc == 'clang' }}
run: |
mv build/bin/vcf_validator vcf_validator_macos
mv build/bin/vcf_debugulator vcf_debugulator_macos
mv build/bin/vcf_assembly_checker vcf_assembly_checker_macos
mv build/bin/vcf_validator vcf_validator_macos_x64
mv build/bin/vcf_debugulator vcf_debugulator_macos_x64
mv build/bin/vcf_assembly_checker vcf_assembly_checker_macos_x64
- name: Upload vcf-validator
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_validator_macos
path: vcf_validator_macos
name: vcf_validator_macos_x64
path: vcf_validator_macos_x64
- name: Upload vcf-debugulator
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_debugulator_macos
path: vcf_debugulator_macos
name: vcf_debugulator_macos_x64
path: vcf_debugulator_macos_x64
- name: Upload vcf-assembly-checker
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_assembly_checker_macos
path: vcf_assembly_checker_macos
name: vcf_assembly_checker_macos_x64
path: vcf_assembly_checker_macos_x64

### Mac OS build arm
macos_build_arm:
runs-on: macos-14
strategy:
matrix:
config:
- {cc: "gcc", cxx: "g++"}
- {cc: "clang", cxx: "clang++"}

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
#brew update
HOMEBREW_NO_AUTO_UPDATE=1 brew install boost sqlite3 automake libtool
./install_dependencies.sh osx
- name: Compile and test
run: |
mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} ..
export LIBRARY_PATH=${LIBRARY_PATH}:/opt/homebrew/opt/icu4c/lib:/opt/homebrew/lib
make -j2
cd .. && ./build/bin/test_validation_suite
- name: Rename release files
if: ${{ matrix.config.cc == 'clang' }}
run: |
mv build/bin/vcf_validator vcf_validator_macos_arm64
mv build/bin/vcf_debugulator vcf_debugulator_macos_arm64
mv build/bin/vcf_assembly_checker vcf_assembly_checker_macos_arm64
- name: Upload vcf-validator
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_validator_macos_arm64
path: vcf_validator_macos_arm64
- name: Upload vcf-debugulator
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_debugulator_macos_arm64
path: vcf_debugulator_macos_arm64
- name: Upload vcf-assembly-checker
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_assembly_checker_macos_arm64
path: vcf_assembly_checker_macos_arm64


### Release job (tags only)
create_release:
if: startsWith(github.ref, 'refs/tags/')
needs: [ linux_build, macos_build ]
needs: [ linux_build, macos_build_intel, macos_build_arm ]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
Expand Down
2 changes: 1 addition & 1 deletion install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ then

echo "installing c-ares"
mkdir c-ares
wget https://c-ares.haxx.se/download/c-ares-1.15.0.tar.gz -O ./c-ares-1.15.0.tar.gz
wget https://github.com/c-ares/c-ares/releases/download/cares-1_15_0/c-ares-1.15.0.tar.gz -O ./c-ares-1.15.0.tar.gz
tar xzf ./c-ares-1.15.0.tar.gz
cd c-ares-1.15.0
./configure --prefix=$dependencies_dir_abs_path/c-ares
Expand Down
Loading