update GitHub Action build workflow to work on both archs (#19) #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: [push, pull_request] | |
| name: Build | |
| jobs: | |
| Build: | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ matrix.os }} R ${{ matrix.r-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ macos-13, macos-14 ] | |
| r-version: [ release, devel ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install R | |
| uses: s-u/R-actions/install@v2 | |
| with: | |
| r-version: ${{ matrix.r-version }} | |
| tools: base | |
| - name: Build | |
| shell: bash | |
| run: | | |
| ## Build Mac-GUI | |
| echo Setup texinfo ... | |
| Rscript -e 'source("https://mac.R-project.org/bin/install.R"); install.libs("texinfo", dep=FALSE)' | |
| echo Build ... | |
| mkdir -p build/logs | |
| for bld in Release Debug; do | |
| echo Build $bld .. | |
| xcodebuild -configuration $bld -arch `uname -m` 2>&1 | tee build/logs/$bld.log | |
| done | |
| echo Pack ... | |
| mkdir R-GUI-build | |
| mv build/Debug R-GUI-build/ | |
| mv build/Release R-GUI-build/ | |
| mv build/logs R-GUI-build/ | |
| hdiutil create -srcfolder R-GUI-build R-GUI-build-${{ matrix.os }}-${{ matrix.r-version }}.dmg | |
| - name: Upload build results | |
| uses: actions/upload-artifact@master | |
| with: | |
| path: R-GUI-build-${{ matrix.os }}-${{ matrix.r-version }}.dmg | |
| name: R-GUI-build-${{ matrix.os }}-${{ matrix.r-version }} |