Skip to content

Commit 924ab79

Browse files
authored
Add aarch64-apple-darwin as target architecture (#260)
* Add aarch64-apple-darwin as target architecture * ignore clippy errors for now * Add aarch64-apple-darwin to toolchain targets * Add space between targets * Maybe without comma? * Maybe like this? * cargo fmt
1 parent fa4b7a7 commit 924ab79

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

.github/workflows/build-test-all.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- x86_64-unknown-linux-gnu
2323
- x86_64-unknown-linux-musl
2424
- x86_64-pc-windows-msvc
25+
- aarch64-apple-darwin
2526
rust:
2627
- stable
2728

@@ -35,6 +36,9 @@ jobs:
3536
- target: x86_64-pc-windows-msvc
3637
os: windows-latest
3738
ext: .exe
39+
- target: aarch64-apple-darwin
40+
os: macos-latest
41+
ext: ""
3842

3943
runs-on: ${{ matrix.os }}
4044

@@ -50,6 +54,9 @@ jobs:
5054
target: x86_64-unknown-linux-musl
5155
components: rustfmt, clippy
5256

57+
- name: Add Apple Silicon Dependencies
58+
run: rustup target add aarch64-apple-darwin
59+
5360
- uses: awalsh128/cache-apt-pkgs-action@v1
5461
if: matrix.os == 'ubuntu-latest'
5562
with:
@@ -64,6 +71,7 @@ jobs:
6471

6572
- name: Test
6673
uses: actions-rs/cargo@v1
74+
if: matrix.os != 'macos-latest' # There are no free runners for Apple Silicon available at the moment
6775
with:
6876
command: test
6977
args: --manifest-path ${{ matrix.crate }}/Cargo.toml --release --target ${{ matrix.target }}
@@ -156,6 +164,14 @@ jobs:
156164
uses: actions/download-artifact@v1
157165
with:
158166
name: vhdl_ls-x86_64-pc-windows-msvc
167+
- name: Get vhdl_lang macos
168+
uses: actions/download-artifact@v1
169+
with:
170+
name: vhdl_lang-aarch64-apple-darwin
171+
- name: Get vhdl_ls macos
172+
uses: actions/download-artifact@v1
173+
with:
174+
name: vhdl_ls-aarch64-apple-darwin
159175
- name: Zip artifacts
160176
run: |
161177
zip -r vhdl_lang-x86_64-unknown-linux-gnu.zip vhdl_lang-x86_64-unknown-linux-gnu
@@ -164,9 +180,11 @@ jobs:
164180
zip -r vhdl_ls-x86_64-unknown-linux-musl.zip vhdl_ls-x86_64-unknown-linux-musl
165181
zip -r vhdl_lang-x86_64-pc-windows-msvc.zip vhdl_lang-x86_64-pc-windows-msvc
166182
zip -r vhdl_ls-x86_64-pc-windows-msvc.zip vhdl_ls-x86_64-pc-windows-msvc
183+
zip -r vhdl_ls-aarch64-apple-darwin.zip vhdl_ls-aarch64-apple-darwin
184+
zip -r vhdl_lang-aarch64-apple-darwin.zip vhdl_lang-aarch64-apple-darwin
167185
- name: Do release
168186
uses: ncipollo/release-action@v1
169187
with:
170188
draft: false
171-
artifacts: "vhdl_lang-x86_64-unknown-linux-gnu.zip,vhdl_ls-x86_64-unknown-linux-gnu.zip,vhdl_lang-x86_64-unknown-linux-musl.zip,vhdl_ls-x86_64-unknown-linux-musl.zip,vhdl_lang-x86_64-pc-windows-msvc.zip,vhdl_ls-x86_64-pc-windows-msvc.zip"
189+
artifacts: "vhdl_lang-x86_64-unknown-linux-gnu.zip,vhdl_ls-x86_64-unknown-linux-gnu.zip,vhdl_lang-x86_64-unknown-linux-musl.zip,vhdl_ls-x86_64-unknown-linux-musl.zip,vhdl_lang-x86_64-pc-windows-msvc.zip,vhdl_ls-x86_64-pc-windows-msvc.zip,vhdl_lang-aarch64-apple-darwin.zip,vhdl_ls-aarch64-apple-darwin.zip"
172190
token: ${{ secrets.GITHUB_TOKEN }}

vhdl_lang/src/analysis/types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ impl<'a> AnalyzeContext<'a> {
204204
unreachable!();
205205
};
206206

207+
#[allow(invalid_reference_casting)]
207208
let region_ptr = unsafe {
208209
let region_ptr = region_ptr as *const Region;
209210
let region_ptr = region_ptr as *mut Region;

vhdl_lang/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl Config {
205205
"../vhdl_libraries",
206206
"../../vhdl_libraries",
207207
"/usr/lib/rust_hdl/vhdl_libraries",
208-
"../share/vhdl_libraries"
208+
"../share/vhdl_libraries",
209209
];
210210

211211
for dir in search_paths.into_iter() {

vhdl_lang/src/named_entity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ impl<'a> AnyEnt<'a> {
491491
}
492492

493493
#[allow(clippy::mut_from_ref)]
494+
#[allow(invalid_reference_casting)]
494495
unsafe fn unsafe_ref_mut(&self) -> &mut Self {
495496
// NOTE: Use read_volatile to prevent compiler to optimization away assignment to the returned reference
496497
let const_ptr = std::ptr::read_volatile(&self) as *const Self;

0 commit comments

Comments
 (0)