Skip to content

Commit

Permalink
Merge pull request #247 from vasudeva8/arm
Browse files Browse the repository at this point in the history
update to generate mac arm binary
  • Loading branch information
tcezard authored Jun 13, 2024
2 parents f134b4a + 188269b commit b1d7a46
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 13 deletions.
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

0 comments on commit b1d7a46

Please sign in to comment.