From cf5b14374085380441b21f769940047fe2ff5c0f Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Tue, 14 Nov 2023 11:12:38 -0600 Subject: [PATCH] File offset is set in piper-phoneize CMake build --- .github/workflows/main.yml | 128 ++++++++++++++++++------------------- Dockerfile | 2 +- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 57f7d31..4543b11 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,67 +61,67 @@ jobs: asset_path: dist/piper_armv7.tar.gz asset_name: piper_linux_armv7l.tar.gz asset_content_type: application/octet-stream - # build_windows: - # runs-on: windows-latest - # name: "windows build: ${{ matrix.arch }}" - # needs: create_release # we need to know the upload URL - # strategy: - # fail-fast: true - # matrix: - # arch: [x64] - # steps: - # - uses: actions/checkout@v3 - # - name: configure - # run: | - # cmake -Bbuild -DCMAKE_INSTALL_PREFIX=_install/piper - # - name: build - # run: | - # cmake --build build --config Release - # - name: install - # run: | - # cmake --install build - # - name: package - # run: | - # cd _install - # Compress-Archive -LiteralPath piper -DestinationPath piper_windows_amd64.zip - # - name: upload - # uses: actions/upload-release-asset@v1 - # env: - # GITHUB_TOKEN: ${{ github.token }} - # with: - # upload_url: ${{ needs.create_release.outputs.upload_url }} - # asset_path: _install/piper_windows_amd64.zip - # asset_name: piper_windows_amd64.zip - # asset_content_type: application/zip - # build_macos: - # name: "macos build: ${{ matrix.arch }}" - # runs-on: macos-latest - # needs: create_release # we need to know the upload URL - # strategy: - # fail-fast: true - # matrix: - # arch: [x64, aarch64] - # steps: - # - uses: actions/checkout@v3 - # - name: configure - # run: | - # cmake -Bbuild -DCMAKE_INSTALL_PREFIX=_install/piper - # - name: build - # run: | - # cmake --build build --config Release - # - name: install - # run: | - # cmake --install build - # - name: package - # run: | - # cd _install && \ - # tar -czf piper_macos_${{ matrix.arch }}.tar.gz piper/ - # - name: upload - # uses: actions/upload-release-asset@v1 - # env: - # GITHUB_TOKEN: ${{ github.token }} - # with: - # upload_url: ${{ needs.create_release.outputs.upload_url }} - # asset_path: _install/piper_macos_${{ matrix.arch }}.tar.gz - # asset_name: piper_macos_${{ matrix.arch }}.tar.gz - # asset_content_type: application/octet-stream + build_windows: + runs-on: windows-latest + name: "windows build: ${{ matrix.arch }}" + needs: create_release # we need to know the upload URL + strategy: + fail-fast: true + matrix: + arch: [x64] + steps: + - uses: actions/checkout@v3 + - name: configure + run: | + cmake -Bbuild -DCMAKE_INSTALL_PREFIX=_install/piper + - name: build + run: | + cmake --build build --config Release + - name: install + run: | + cmake --install build + - name: package + run: | + cd _install + Compress-Archive -LiteralPath piper -DestinationPath piper_windows_amd64.zip + - name: upload + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ needs.create_release.outputs.upload_url }} + asset_path: _install/piper_windows_amd64.zip + asset_name: piper_windows_amd64.zip + asset_content_type: application/zip + build_macos: + name: "macos build: ${{ matrix.arch }}" + runs-on: macos-latest + needs: create_release # we need to know the upload URL + strategy: + fail-fast: true + matrix: + arch: [x64, aarch64] + steps: + - uses: actions/checkout@v3 + - name: configure + run: | + cmake -Bbuild -DCMAKE_INSTALL_PREFIX=_install/piper + - name: build + run: | + cmake --build build --config Release + - name: install + run: | + cmake --install build + - name: package + run: | + cd _install && \ + tar -czf piper_macos_${{ matrix.arch }}.tar.gz piper/ + - name: upload + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ needs.create_release.outputs.upload_url }} + asset_path: _install/piper_macos_${{ matrix.arch }}.tar.gz + asset_name: piper_macos_${{ matrix.arch }}.tar.gz + asset_content_type: application/octet-stream diff --git a/Dockerfile b/Dockerfile index d0b1d67..de2718b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apt-get update && \ WORKDIR /build COPY ./ ./ -RUN cmake -Bbuild -DCMAKE_INSTALL_PREFIX=install -D_FILE_OFFSET_BITS=64 +RUN cmake -Bbuild -DCMAKE_INSTALL_PREFIX=install RUN cmake --build build --config Release RUN cmake --install build