|
1 | 1 | name: Setup BuildStream |
2 | 2 | inputs: |
3 | | - venv-path: |
4 | | - description: Path to the Python venv folder created for BuildStream |
5 | | - required: false |
6 | | - default: ${{ github.workspace }}/.venv |
7 | 3 | caches-path: |
8 | 4 | description: Path to the cache folder that BuildStream will use to cache artifacts |
9 | 5 | required: false |
@@ -33,9 +29,9 @@ inputs: |
33 | 29 | required: false |
34 | 30 | default: '${GITHUB_REPOSITORY#*/}' |
35 | 31 | outputs: |
36 | | - activate-path: |
37 | | - description: Path to the Python venv activate script |
38 | | - value: ${{ steps.install-buildstream.outputs.activate-path }} |
| 32 | + shell: |
| 33 | + description: Shell with BuildStream env |
| 34 | + value: ${{ steps.install-buildstream.outputs.shell }} |
39 | 35 | caches-path: |
40 | 36 | description: Path to the cache folder that BuildStream uses to cache artifacts |
41 | 37 | value: ${{ inputs.caches-path }} |
@@ -63,11 +59,11 @@ runs: |
63 | 59 | exit 2 |
64 | 60 |
|
65 | 61 | - name: Check Runner Architecture |
66 | | - if: runner.arch != 'x64' |
| 62 | + if: runner.arch != 'x64' && runner.arch != 'ARM64' |
67 | 63 | shell: bash |
68 | 64 | run: | |
69 | 65 | : Check Runner Architecture |
70 | | - echo "::notice::setup-buildstream action requires a x86_64 runner." |
| 66 | + echo "::notice::setup-buildstream action requires a x86_64 or a ARM64 runner." |
71 | 67 | exit 2 |
72 | 68 |
|
73 | 69 | - name: Check Action Inputs |
@@ -101,73 +97,38 @@ runs: |
101 | 97 | esac |
102 | 98 | echo ::endgroup:: |
103 | 99 |
|
104 | | - - name: Install buildbox-integration |
105 | | - env: |
106 | | - DOWNLOAD_URL: https://gitlab.com/api/v4/projects/8347934/packages/generic/releases/1.1.0/buildbox-1.1.0-x86_64-linux-gnu.tgz |
107 | | - DOWNLOAD_SHA256: e2e63112290b5bd6a64ccf26e40a53b73badb7b88dd98b20fca48a8050f93361 |
| 100 | + - name: Install Toolbx container |
108 | 101 | shell: bash |
109 | 102 | run: | |
110 | | - : Install buildbox-integration |
| 103 | + : Install Toolbx container |
111 | 104 |
|
112 | | - echo ::group::Install dependencies |
113 | | - sudo apt-get install bubblewrap fuse3 arch-test |
| 105 | + echo ::group::Install Toolbx |
| 106 | + sudo apt-get install podman-toolbox |
114 | 107 | echo ::endgroup |
115 | 108 |
|
116 | | - echo ::group::Create download directory |
117 | | - DOWNLOAD_DIR=$(mktemp -d) |
118 | | - echo ::endgroup:: |
119 | | -
|
120 | | - echo ::group::Download tarball |
121 | | - DOWNLOAD_FILE="${DOWNLOAD_DIR}/$(basename ${DOWNLOAD_URL})" |
122 | | -
|
123 | | - curl ${DOWNLOAD_URL} --location --output ${DOWNLOAD_FILE} |
124 | | - echo ::endgroup:: |
125 | | -
|
126 | | - echo ::group::Check sha256sum |
127 | | - echo "${DOWNLOAD_SHA256} ${DOWNLOAD_FILE}" | sha256sum --check --status |
128 | | - echo ::endgroup:: |
129 | | -
|
130 | | - echo ::group::Extract to ~/.local/bin |
131 | | - mkdir ~/.local/bin |
132 | | - tar -zxvf ${DOWNLOAD_FILE} -C ~/.local/bin |
133 | | - echo ::endgroup:: |
134 | | -
|
135 | | - echo ::group::Cleanup download directory |
136 | | - rm -rf DOWNLOAD_DIR |
137 | | - echo ::endgroup:: |
| 109 | + echo ::group::Create container |
| 110 | + SHELL=$(which bash) toolbox -y --log-level=info --log-podman create buildstream --distro fedora --release 41 |
| 111 | + echo ::endgroup |
138 | 112 |
|
139 | 113 | - name: Install BuildStream |
140 | 114 | id: install-buildstream |
141 | | - env: |
142 | | - ACTIVATE_PATH: ${{ inputs.venv-path }}/bin/activate |
143 | 115 | shell: bash |
144 | 116 | run: | |
145 | 117 | : Install BuildStream |
146 | | - echo ::group::Create and activate Python venv |
147 | | - python -m venv ${{ inputs.venv-path }} |
148 | | - echo "activate-path=${ACTIVATE_PATH}" >> $GITHUB_OUTPUT |
149 | | - source ${ACTIVATE_PATH} |
150 | | - echo ::endgroup:: |
151 | 118 |
|
152 | 119 | echo ::group::Install BuildStream |
153 | | - sudo apt-get install lzip |
154 | | - pip install -U BuildStream |
155 | | - echo ::endgroup:: |
| 120 | + toolbox run -c buildstream sudo dnf -y install buildstream arch-test |
| 121 | + echo 'shell=toolbox run -c buildstream bash --noprofile --norc -eo pipefail {0}' >> $GITHUB_OUTPUT |
| 122 | + echo ::endgroup |
156 | 123 |
|
157 | 124 | - name: Install BuildStream plugins dependencies |
158 | | - shell: bash |
| 125 | + shell: ${{ steps.install-buildstream.outputs.shell }} |
159 | 126 | run: | |
160 | 127 | : Install BuildStream plugins dependencies |
161 | | - echo ::group::Activate Python venv |
162 | | - source ${{ steps.install-buildstream.outputs.activate-path }} |
163 | | - echo ::endgroup:: |
164 | 128 |
|
165 | | - echo ::group::Install plugins dependencies |
166 | | - pip install -U dulwich>=0.21.7 requests packaging tomli |
167 | | - echo ::endgroup:: |
168 | | -
|
169 | | - - name: Set Up QEMU |
170 | | - uses: docker/setup-qemu-action@v3 |
| 129 | + echo ::group::Install BuildStream plugins dependencies |
| 130 | + sudo dnf -y install python3-dulwich python3-requests python3-packaging python3-tomli |
| 131 | + echo ::endgroup |
171 | 132 |
|
172 | 133 | - name: Setup BuildStream config file |
173 | 134 | shell: bash |
|
0 commit comments