Revert "Attempt new headless sync implementation" #5
This file contains 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
name: Build gomuks | |
on: | |
push: | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
macos_x86: | |
runs-on: macos-latest | |
name: Build on macOS (x86_64) | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
- name: Install libolm | |
run: brew install libolm | |
- name: Build CLI | |
run: ./build.sh && mv gomuks gomuks-macos-x86 | |
- name: Upload macOS Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: macOS-x86_64 | |
path: gomuks-macos-x86 | |
if-no-files-found: error | |
macos_arm: | |
runs-on: macos-latest | |
name: Build on macOS (ARM) | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
- name: Install libolm | |
run: brew fetch --force --bottle-tag=arm64_monterey libolm && brew install $(brew --cache --bottle-tag=arm64_monterey libolm) | |
- name: Build CLI | |
run: CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 ./build.sh | |
- name: Update RPATH | |
run: | | |
install_name_tool -change /usr/local/opt/libolm/lib/libolm.3.dylib @rpath/libolm.3.dylib gomuks | |
install_name_tool -add_rpath @executable_path gomuks | |
install_name_tool -add_rpath /opt/homebrew/opt/libolm/lib gomuks | |
install_name_tool -add_rpath /usr/local/opt/libolm/lib gomuks | |
- name: Rename binary | |
run: mv gomuks gomuks-macos-arm | |
- name: Upload macOS Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: macOS-ARM | |
path: gomuks-macos-arm | |
if-no-files-found: error | |
linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arch: [x86_64, aarch64, armv7] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Alpine (${{ matrix.arch }}) | |
uses: jirutka/setup-alpine@v1 | |
with: | |
arch: ${{ matrix.arch }} | |
packages: > | |
go | |
git | |
build-base | |
- name: Fetch libolm | |
run: git clone --single-branch --branch 3.2.14 https://gitlab.matrix.org/matrix-org/olm.git /olm | |
shell: alpine.sh --root {0} | |
- name: Install libolm | |
run: cd /olm && CFLAGS=-static-libgcc CPPFLAGS="-static-libgcc -static-libstdc++" make install | |
shell: alpine.sh --root {0} | |
- name: Build CLI | |
run: ./build.sh && mv gomuks gomuks-linux-${{ matrix.arch }} | |
shell: alpine.sh {0} | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-${{ matrix.arch }} | |
path: gomuks-linux-${{ matrix.arch }} | |
if-no-files-found: error | |
publish: | |
runs-on: ubuntu-latest | |
needs: [macos_x86, macos_arm, linux] | |
steps: | |
- uses: actions/download-artifact@v3 | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "macOS-*/*,linux-*/*" | |
body: The most recent gomuks binaries | |
name: "Nightly" | |
tag: nightly | |
commit: beepberry | |
allowUpdates: true | |
artifactErrorsFailBuild: true | |
makeLatest: true |