Skip to content

Commit

Permalink
macOS GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
Baekalfen committed May 8, 2024
1 parent c1e372e commit 8e9b4ff
Showing 1 changed file with 81 additions and 51 deletions.
132 changes: 81 additions & 51 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,69 +126,99 @@ jobs:
- name: compile
run: meson compile -C build

dist-builds:
name: "distribution builds"
# dist-builds:
# name: "distribution builds"

# needs: [sanity]

# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# container:
# - {os: 'almalinux', ver: '8'}
# - {os: 'almalinux', ver: '9'}
# - {os: 'alpine', ver: 'latest'}
# - {os: 'archlinux', ver: 'latest'}
# - {os: 'debian', ver: 'trixie'}
# - {os: 'debian', ver: 'bookworm'}
# - {os: 'debian', ver: 'bullseye'}
# - {os: 'debian', ver: 'buster'}
# - {os: 'fedora', ver: 'rawhide'}
# - {os: 'fedora', ver: '38'}
# - {os: 'fedora', ver: '37'}
# - {os: 'rockylinux', ver: '8'}
# - {os: 'rockylinux', ver: '9'}
# - {os: 'ubuntu', ver: 'mantic'}
# - {os: 'ubuntu', ver: 'lunar'}
# - {os: 'ubuntu', ver: 'jammy'}
# - {os: 'ubuntu', ver: 'focal'}
# - {os: 'macos', ver: 'latest'}

# container:
# image: ${{ matrix.container.os }}:${{ matrix.container.ver }}

# steps:
# - name: checkout
# uses: actions/checkout@v4

# - name: install dependencies
# env:
# SETUP_SCRIPT: .github/scripts/build/${{ matrix.container.os}}-setup-${{ matrix.container.ver }}.sh
# run: ${SETUP_SCRIPT}

# - name: configure build
# run: meson setup build -Dlibnvme=disabled

# - name: compile
# run: ninja -C build

# - name: upload log
# uses: actions/upload-artifact@v3
# if: failure()
# with:
# name: meson log
# path: build/meson-logs/meson-log.txt

# - name: unit tests
# run: meson test -C build "libvfn:"

# - name: upload log
# uses: actions/upload-artifact@v3
# if: failure()
# with:
# name: meson test log
# path: build/meson-logs/testlog.txt

macos-build:
name: "macOS build"

needs: [sanity]

runs-on: ubuntu-latest
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
container:
- {os: 'almalinux', ver: '8'}
- {os: 'almalinux', ver: '9'}
- {os: 'alpine', ver: 'latest'}
- {os: 'archlinux', ver: 'latest'}
- {os: 'debian', ver: 'trixie'}
- {os: 'debian', ver: 'bookworm'}
- {os: 'debian', ver: 'bullseye'}
- {os: 'debian', ver: 'buster'}
- {os: 'fedora', ver: 'rawhide'}
- {os: 'fedora', ver: '38'}
- {os: 'fedora', ver: '37'}
- {os: 'rockylinux', ver: '8'}
- {os: 'rockylinux', ver: '9'}
- {os: 'ubuntu', ver: 'mantic'}
- {os: 'ubuntu', ver: 'lunar'}
- {os: 'ubuntu', ver: 'jammy'}
- {os: 'ubuntu', ver: 'focal'}
- {os: 'macos', ver: 'latest'}

container:
image: ${{ matrix.container.os }}:${{ matrix.container.ver }}

steps:
- name: checkout
uses: actions/checkout@v4

- name: install dependencies
env:
SETUP_SCRIPT: .github/scripts/build/${{ matrix.container.os}}-setup-${{ matrix.container.ver }}.sh
run: ${SETUP_SCRIPT}

- name: configure build
run: meson setup build -Dlibnvme=disabled

- name: compile
run: ninja -C build

- name: upload log
uses: actions/upload-artifact@v3
if: failure()
with:
name: meson log
path: build/meson-logs/meson-log.txt
repository: samsungds/macvfn
ref: libvfn4 # TODO: master

- name: unit tests
run: meson test -C build "libvfn:"
- name: Setup submodule
run: |
SUBMODULE_PATH="MacVFN/libvfn"
BRANCH_NAME=${GITHUB_HEAD_REF#refs/heads/}
git config -f .gitmodules submodule.$SUBMODULE_PATH.url ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
git config -f .gitmodules submodule.$SUBMODULE_PATH.branch "$BRANCH_NAME"
cat .gitmodules
- name: upload log
uses: actions/upload-artifact@v3
if: failure()
with:
name: meson test log
path: build/meson-logs/testlog.txt
- name: Install dependencies
run: brew install meson

- name: Xcode build
run: make build

device-test:
name: "run emulated nvme device tests"
Expand Down

0 comments on commit 8e9b4ff

Please sign in to comment.