File tree Expand file tree Collapse file tree 1 file changed +72
-0
lines changed
Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+ on : [push]
3+ jobs :
4+ build :
5+ # Set the job to run on the platform specified by the matrix below
6+ runs-on : ${{ matrix.runner }}
7+
8+ # Define the build matrix for cross-compilation
9+ strategy :
10+ matrix :
11+ include :
12+ - name : linux-amd64
13+ runner : ubuntu-latest
14+ target : x86_64-unknown-linux-gnu
15+ - name : win-amd64
16+ runner : windows-latest
17+ target : x86_64-pc-windows-msvc
18+ - name : macos-amd64
19+ runner : macos-latest
20+ target : x86_64-apple-darwin
21+ - name : macos-arm64
22+ runner : macos-latest
23+ target : aarch64-apple-darwin
24+
25+ # The steps to run for each matrix item
26+ steps :
27+ - name : Checkout
28+ uses : actions/checkout@v3
29+
30+ - name : Install Rust
31+ uses : dtolnay/rust-toolchain@stable
32+ with :
33+ targets : " ${{ matrix.target }}"
34+
35+ - name : Setup Cache
36+ uses : Swatinem/rust-cache@v2
37+
38+ - name : Build Binary
39+ run : cargo build --verbose --locked --release --target ${{ matrix.target }}
40+
41+ - name : Move Binary
42+ shell : bash
43+ run : |
44+ BIN_SUFFIX=""
45+ if [[ "${{ matrix.runner }}" == "windows-latest" ]]; then
46+ BIN_SUFFIX=".exe"
47+ fi
48+
49+ # The built binary output location
50+ BIN_OUTPUT="target/${{ matrix.target }}/release/basiclings${BIN_SUFFIX}"
51+
52+ mkdir "artifact-${{ matrix.name }}"
53+ # Move the built binary where you want it
54+ mv "${BIN_OUTPUT}" "./artifact-${{ matrix.name }}/basiclings${BIN_SUFFIX}"
55+ - name : Build Autotester
56+ shell : bash
57+ run : |
58+ git clone https://github.com/CE-Programming/CEmu.git
59+ cd CEmu/core
60+ make
61+ cd ../tests/autotester
62+ make
63+ cd ../../../
64+ mv "CEmu/tests/autotester/autotester${BIN_SUFFIX}" "./artifact-${{ matrix.name }}/autotester${BIN_SUFFIX}"
65+ - name : Package
66+ shell : bash
67+ run : |
68+ zip "./artifact-${{ matrix.name }}"
69+ - name : Upload
70+ 71+ with :
72+ name : " artifact-${{ matrix.name }}.zip"
You can’t perform that action at this time.
0 commit comments