|
10 | 10 | runs-on: ${{ matrix.os }} |
11 | 11 | strategy: |
12 | 12 | matrix: |
13 | | - # os: [ macos-13, windows-latest, ubuntu-22.04 ] # todo restore macos to latest once python major is updated |
14 | | - os: [windows-latest, ubuntu-22.04 ] |
15 | | - arch: [ x64, arm64 ] |
16 | | - exclude: |
17 | | - - os: macos-13 |
18 | | - arch: arm64 |
19 | | - - os: windows-latest |
20 | | - arch: arm64 |
| 13 | + os: [ windows-latest, ubuntu-22.04 ] |
| 14 | + arch: [ x64 ] |
21 | 15 |
|
22 | 16 | steps: |
23 | 17 | - uses: actions/checkout@v3 |
|
28 | 22 | python-version: '3.10.x' |
29 | 23 | architecture: x64 |
30 | 24 |
|
31 | | - - name: Build OctoBot Binary on Linux arm64 |
32 | | - if: matrix.os == 'ubuntu-22.04' && matrix.arch == 'arm64' |
33 | | - |
34 | | - with: |
35 | | - arch: aarch64 |
36 | | - distro: ubuntu22.04 |
37 | | - githubToken: ${{ github.token }} |
38 | | - env: | |
39 | | - GH_REPO: Drakkar-Software/OctoBot-Tentacles |
40 | | - OCTOBOT_GH_REPO: https://github.com/Drakkar-Software/OctoBot.git |
41 | | - OCTOBOT_DEFAULT_BRANCH: dev |
42 | | - OCTOBOT_REPOSITORY_DIR: OctoBot |
43 | | - NLTK_DATA: nltk_data |
44 | | - BUILD_ARCH: ${{ matrix.arch }} |
45 | | - run: | |
46 | | - apt-get update |
47 | | - apt-get install -y --no-install-recommends python3.10 python3-pip python3-dev git gcc musl-dev libc-dev build-essential zlib1g zlib1g-dev |
48 | | - bash ./build_scripts/unix.sh |
49 | | -
|
50 | 25 | - name: Build OctoBot Binary on Linux |
51 | 26 | if: matrix.os == 'ubuntu-22.04' && matrix.arch == 'x64' |
52 | 27 | env: |
@@ -104,110 +79,11 @@ jobs: |
104 | 79 | path: OctoBot/dist/OctoBot_windows.exe |
105 | 80 | if-no-files-found: error |
106 | 81 |
|
107 | | - create-release: |
108 | | - name: Create Release |
109 | | - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') |
110 | | - needs: builds |
111 | | - runs-on: ubuntu-22.04 |
112 | | - steps: |
113 | | - - name: Download artifacts |
114 | | - uses: actions/download-artifact@v4 |
115 | | - |
116 | | - - name: Set version as environement var |
117 | | - id: vars |
118 | | - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} |
119 | | - |
120 | | - - name: Clean artifact names |
121 | | - run: | |
122 | | - sudo apt-get update |
123 | | - sudo apt-get install rename -y |
124 | | - find . -type f -exec bash -c 'mv $1 $(basename $(dirname $1)).tmp && rm -rf $(basename $(dirname $1)) && rename 's/\.tmp$//' *.tmp' _ {} \; |
125 | | -
|
126 | | - - name: Compute hashes |
127 | | - id: hashes |
128 | | - # run: | |
129 | | - # echo ::set-output name=octobot_linux_x64_hash::$(openssl sha256 ./OctoBot_linux_x64 | awk '{print $2}') |
130 | | - # echo ::set-output name=octobot_linux_arm64_hash::$(openssl sha256 ./OctoBot_linux_arm64 | awk '{print $2}') |
131 | | - # echo ::set-output name=octobot_macos_x64_hash::$(openssl sha256 ./OctoBot_macos_x64 | awk '{print $2}') |
132 | | - # echo ::set-output name=octobot_windows_x64_hash::$(openssl sha256 ./OctoBot_windows_x64.exe | awk '{print $2}') |
133 | | - run: | |
134 | | - echo ::set-output name=octobot_linux_x64_hash::$(openssl sha256 ./OctoBot_linux_x64 | awk '{print $2}') |
135 | | - echo ::set-output name=octobot_linux_arm64_hash::$(openssl sha256 ./OctoBot_linux_arm64 | awk '{print $2}') |
136 | | - echo ::set-output name=octobot_windows_x64_hash::$(openssl sha256 ./OctoBot_windows_x64.exe | awk '{print $2}') |
137 | | -
|
138 | | - - name: Create Release |
139 | | - id: create_release |
140 | | - uses: actions/create-release@v1 |
141 | | - env: |
142 | | - GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} |
143 | | - with: |
144 | | - tag_name: ${{ steps.vars.outputs.tag }} |
145 | | - release_name: Release - ${{ steps.vars.outputs.tag }} |
146 | | - owner: ${{ github.repository_owner }} |
147 | | - repo: OctoBot |
148 | | - draft: true |
149 | | - prerelease: false |
150 | | - commitish: master |
151 | | - # body: | |
152 | | - # | Binary | Download link | SHA256 | |
153 | | - # | ------------- |:-------------:|:-------------:| |
154 | | - # | Windows x64 | [Download](https://github.com/${{ github.repository_owner }}/OctoBot/releases/download/${{ steps.vars.outputs.tag }}/OctoBot_windows_x64.exe) | ${{ steps.hashes.outputs.octobot_windows_x64_hash }} | |
155 | | - # | Linux x64 | [Download](https://github.com/${{ github.repository_owner }}/OctoBot/releases/download/${{ steps.vars.outputs.tag }}/OctoBot_linux_x64) | ${{ steps.hashes.outputs.octobot_linux_x64_hash }} | |
156 | | - # | Linux arm64 | [Download](https://github.com/${{ github.repository_owner }}/OctoBot/releases/download/${{ steps.vars.outputs.tag }}/OctoBot_linux_arm64) | ${{ steps.hashes.outputs.octobot_linux_arm64_hash }} | |
157 | | - # | MacOS x64 | [Download](https://github.com/${{ github.repository_owner }}/OctoBot/releases/download/${{ steps.vars.outputs.tag }}/OctoBot_macos_x64) | ${{ steps.hashes.outputs.octobot_macos_x64_hash }} | |
158 | | - body: | |
159 | | - | Binary | Download link | SHA256 | |
160 | | - | ------------- |:-------------:|:-------------:| |
161 | | - | Windows x64 | [Download](https://github.com/${{ github.repository_owner }}/OctoBot/releases/download/${{ steps.vars.outputs.tag }}/OctoBot_windows_x64.exe) | ${{ steps.hashes.outputs.octobot_windows_x64_hash }} | |
162 | | - | Linux x64 | [Download](https://github.com/${{ github.repository_owner }}/OctoBot/releases/download/${{ steps.vars.outputs.tag }}/OctoBot_linux_x64) | ${{ steps.hashes.outputs.octobot_linux_x64_hash }} | |
163 | | - | Linux arm64 | [Download](https://github.com/${{ github.repository_owner }}/OctoBot/releases/download/${{ steps.vars.outputs.tag }}/OctoBot_linux_arm64) | ${{ steps.hashes.outputs.octobot_linux_arm64_hash }} | |
164 | | -
|
165 | | - - name: Upload Release Asset - OctoBot_windows_x64 |
166 | | - uses: actions/upload-release-asset@v1 |
167 | | - env: |
168 | | - GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} |
169 | | - with: |
170 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
171 | | - asset_path: ./OctoBot_windows_x64.exe |
172 | | - asset_name: OctoBot_windows_x64.exe |
173 | | - asset_content_type: application/x-binary |
174 | | - |
175 | | - - name: Upload Release Asset - OctoBot_linux_x64 |
176 | | - uses: actions/upload-release-asset@v1 |
177 | | - env: |
178 | | - GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} |
179 | | - with: |
180 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
181 | | - asset_path: ./OctoBot_linux_x64 |
182 | | - asset_name: OctoBot_linux_x64 |
183 | | - asset_content_type: application/x-binary |
184 | | - |
185 | | - - name: Upload Release Asset - OctoBot_linux_arm64 |
186 | | - uses: actions/upload-release-asset@v1 |
187 | | - env: |
188 | | - GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} |
189 | | - with: |
190 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
191 | | - asset_path: ./OctoBot_linux_arm64 |
192 | | - asset_name: OctoBot_linux_arm64 |
193 | | - asset_content_type: application/x-binary |
194 | | - |
195 | | - # - name: Upload Release Asset - OctoBot_macos_x64 |
196 | | - # uses: actions/upload-release-asset@v1 |
197 | | - # env: |
198 | | - # GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} |
199 | | - # with: |
200 | | - # upload_url: ${{ steps.create_release.outputs.upload_url }} |
201 | | - # asset_path: ./OctoBot_macos_x64 |
202 | | - # asset_name: OctoBot_macos_x64 |
203 | | - # asset_content_type: application/x-binary |
204 | | - |
205 | 82 | notify: |
206 | 83 | name: Notify |
207 | 84 | runs-on: ubuntu-22.04 |
208 | 85 | needs: |
209 | 86 | - builds |
210 | | - - create-release |
211 | 87 | if: ${{ failure() }} |
212 | 88 |
|
213 | 89 | steps: |
|
0 commit comments