Skip to content

Commit

Permalink
Updated the repository
Browse files Browse the repository at this point in the history
  • Loading branch information
yushulx committed May 20, 2024
1 parent b324bba commit bac713d
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 492 deletions.
106 changes: 53 additions & 53 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,53 +11,53 @@ env:
BUILD_TYPE: Release

jobs:
arm32_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# arm32_build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2

- name: CMake build and run
run: |
docker run --platform linux/arm/v7 --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp arm32v7/gcc bash -c "apt update && apt install -y cmake; mkdir build && cmake -B build && cmake --build build --config ${{env.BUILD_TYPE}} && cmake --install build; ./dist/BarcodeReader ./images/AllSupportedBarcodeTypes.png ./license-key.txt"
# - name: CMake build and run
# run: |
# docker run --platform linux/arm/v7 --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp arm32v7/gcc bash -c "apt update && apt install -y cmake; mkdir build && cmake -B build && cmake --build build --config ${{env.BUILD_TYPE}} && cmake --install build; ./dist/main ./images/AllSupportedBarcodeTypes.png ./license-key.txt"

- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: arm32.zip
exclusions: '*.git* /*node_modules/* .editorconfig'
path: ${{github.workspace}}/dist
# - name: Archive Release
# uses: thedoctor0/zip-release@main
# with:
# type: 'zip'
# filename: arm32.zip
# exclusions: '*.git* /*node_modules/* .editorconfig'
# path: ${{github.workspace}}/dist

- uses: actions/upload-artifact@v2
with:
path: ./*.zip
# - uses: actions/upload-artifact@v2
# with:
# path: ./*.zip

arm64_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# arm64_build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2

- name: CMake build and run
run: |
docker run --platform linux/arm64/v8 --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp arm64v8/gcc bash -c "apt update && apt install -y cmake; mkdir build && cmake -B build && cmake --build build --config ${{env.BUILD_TYPE}} && cmake --install build; ./dist/BarcodeReader ./images/AllSupportedBarcodeTypes.png ./license-key.txt"
# - name: CMake build and run
# run: |
# docker run --platform linux/arm64/v8 --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp arm64v8/gcc bash -c "apt update && apt install -y cmake; mkdir build && cmake -B build && cmake --build build --config ${{env.BUILD_TYPE}} && cmake --install build; ./dist/main ./images/AllSupportedBarcodeTypes.png ./license-key.txt"

- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: arm64.zip
exclusions: '*.git* /*node_modules/* .editorconfig'
path: ${{github.workspace}}/dist
# - name: Archive Release
# uses: thedoctor0/zip-release@main
# with:
# type: 'zip'
# filename: arm64.zip
# exclusions: '*.git* /*node_modules/* .editorconfig'
# path: ${{github.workspace}}/dist

- uses: actions/upload-artifact@v2
with:
path: ./*.zip
# - uses: actions/upload-artifact@v2
# with:
# path: ./*.zip

build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
Expand All @@ -81,26 +81,26 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake -B ${{github.workspace}}/examples/9.x/command_line/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cmake --install ${{github.workspace}}/build
cmake --build ${{github.workspace}}/examples/9.x/command_line/build --config ${{env.BUILD_TYPE}}
cmake --install ${{github.workspace}}/examples/9.x/command_line/build
- name: Test
working-directory: ${{github.workspace}}/dist
run: ./BarcodeReader ../images/AllSupportedBarcodeTypes.png ../license-key.txt
working-directory: ${{github.workspace}}/examples/9.x/command_line/dist
run: ./main ../../../../images/AllSupportedBarcodeTypes.png ../../../../license-key.txt

- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: ${{ matrix.os }}.zip
exclusions: '*.git* /*node_modules/* .editorconfig'
path: ${{github.workspace}}/dist
# - name: Archive Release
# uses: thedoctor0/zip-release@main
# with:
# type: 'zip'
# filename: ${{ matrix.os }}.zip
# exclusions: '*.git* /*node_modules/* .editorconfig'
# path: ${{github.workspace}}/dist

- uses: actions/upload-artifact@v2
with:
path: ./*.zip
# - uses: actions/upload-artifact@v2
# with:
# path: ./*.zip
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/build
/.vscode
/dist
build
Loading

0 comments on commit bac713d

Please sign in to comment.