git.delta.rocks / jrsonnet / refs/commits / c7d58a27dd40

difftreelog

ci rework build target list

Yaroslav Bolyukin2022-05-26parent: #9f8d4fc.patch.diff
in: master

1 file changed

modified.github/workflows/release.ymldiffbeforeafterboth
54 strategy:54 strategy:
55 matrix:55 matrix:
56 target:56 target:
57 # Linux build notes:
58 # While musl targets are not as supported as gnu, those are most relevant to users,
59 # which want to download binaries from github, as glibc has compatibility issues
60 # with older distros
61
57 # Tier 162 # Tier 1
58 - aarch64-unknown-linux-gnu63 - i686-pc-windows-msvc
59 - i686-unknown-linux-gnu64 - x86_64-apple-darwin
60 - x86_64-unknown-linux-gnu65 - x86_64-pc-windows-msvc
66
67 # Tier 2
61 - x86_64-apple-darwin68 - aarch64-apple-darwin
62 - i686-pc-windows-msvc69 - aarch64-unknown-linux-musl
63 - x86_64-pc-windows-msvc70 - i686-unknown-linux-musl
64
65 # Other
66 - x86_64-unknown-linux-musl71 - x86_64-unknown-linux-musl
67 include:72 include:
73 # Linux
68 - target: aarch64-unknown-linux-gnu74 - target: aarch64-unknown-linux-musl
69 os: ubuntu-latest75 os: ubuntu-latest
70 bin: jrsonnet76 bin: jrsonnet
71 name: jrsonnet-linux-gnu-aarch6477 name: jrsonnet-linux-aarch64
72 - target: i686-pc-windows-msvc78 - target: i686-unknown-linux-musl
73 os: windows-latest79 os: ubuntu-latest
74 bin: jrsonnet.exe80 bin: jrsonnet
75 name: jrsonnet-windows-msvc-i686.exe81 name: jrsonnet-linux-gnu-i686
76 - target: i686-unknown-linux-gnu82 - target: x86_64-unknown-linux-musl
77 os: ubuntu-latest83 os: ubuntu-latest
78 bin: jrsonnet84 bin: jrsonnet
79 name: jrsonnet-linux-gnu-i68685 name: jrsonnet-linux-gnu-amd64
86
87 # Windows
80 - target: x86_64-apple-darwin88 - target: i686-pc-windows-msvc
81 os: macOS-latest89 os: windows-latest
82 bin: jrsonnet90 bin: jrsonnet.exe
83 name: jrsonnet-darwin-amd6491 name: jrsonnet-windows-i686.exe
84 - target: x86_64-pc-windows-msvc92 - target: x86_64-pc-windows-msvc
85 os: windows-latest93 os: windows-latest
86 bin: jrsonnet.exe94 bin: jrsonnet.exe
87 name: jrsonnet-windows-msvc-amd64.exe95 name: jrsonnet-windows-amd64.exe
96
97 # Apple
88 - target: x86_64-unknown-linux-gnu98 - target: aarch64-apple-darwin
89 os: ubuntu-latest99 os: macOS-latest
90 bin: jrsonnet100 bin: jrsonnet
91 name: jrsonnet-linux-gnu-amd64101 name: jrsonnet-darwin-aarch64
92
93 - target: x86_64-unknown-linux-musl102 - target: x86_64-apple-darwin
94 os: ubuntu-latest103 os: macOS-latest
95 bin: jrsonnet104 bin: jrsonnet
96 name: jrsonnet-linux-static-amd64105 name: jrsonnet-darwin-amd64
97 runs-on: ${{ matrix.os }}106 runs-on: ${{ matrix.os }}
98 steps:107 steps:
99 - name: Install stable toolchain108 - name: Install stable toolchain
111 run: echo 'EXPERIMENTAL_FLAGS=--features=experimental' >> $GITHUB_ENV120 run: echo 'EXPERIMENTAL_FLAGS=--features=experimental' >> $GITHUB_ENV
112121
113 - name: Linux x86 cross compiler122 - name: Linux x86 cross compiler
114 if: ${{ matrix.target == 'i686-unknown-linux-gnu' }}123 if: ${{ startsWith(matrix.target, 'i686-unknown-linux-') }}
115 run: sudo apt install gcc-multilib124 run: sudo apt install gcc-multilib
116
117 - name: Musl gcc
118 if: ${{ endsWith(matrix.target, '-musl') }}
119 run: sudo apt install musl musl-tools
120125
121 - name: ARM cross compiler126 - name: ARM cross compiler
122 if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}127 if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
129 if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}134 if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
130 run: sudo apt install gcc-aarch64-linux-gnu135 run: sudo apt install gcc-aarch64-linux-gnu
131136
132 - name: Run ARM build137 - name: Musl gcc
133 if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}138 if: ${{ endsWith(matrix.target, '-musl') }}
134 shell: bash
135 run: cross build --bin=jrsonnet --release --target ${{ matrix.target }} ${{ env.EXPERIMENTAL_FLAGS }}139 run: sudo apt install musl musl-tools
136140
137 - name: Run ARM strip141 - name: Run cross build
138 if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}142 if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
139 shell: bash143 shell: bash
140 run: aarch64-linux-gnu-strip target/${{ matrix.target }}/release/${{ matrix.bin }}144 run: cross build --bin=jrsonnet --release --target ${{ matrix.target }} ${{ env.EXPERIMENTAL_FLAGS }}
141145
142 - name: Run build146 - name: Run build
143 if: ${{ !startsWith(matrix.target, 'aarch64-unknown-linux-') }}147 if: ${{ !startsWith(matrix.target, 'aarch64-unknown-linux-') }}
146 command: build150 command: build
147 args: --bin=jrsonnet --release --target ${{ matrix.target }} ${{ env.EXPERIMENTAL_FLAGS }}151 args: --bin=jrsonnet --release --target ${{ matrix.target }} ${{ env.EXPERIMENTAL_FLAGS }}
148
149 - name: Run strip
150 if: ${{ !startsWith(matrix.target, 'aarch64-unknown-linux-') }}
151 shell: bash
152 run: strip target/${{ matrix.target }}/release/${{ matrix.bin }}
153152
154 - name: Package153 - name: Package
155 shell: bash154 shell: bash